We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e455ee6 + 019b8c0 commit 4ef04b5Copy full SHA for 4ef04b5
lib/docurium/docparser.rb
@@ -12,12 +12,17 @@ class DocParser
12
def find_clang_includes
13
@includes ||=
14
begin
15
- bindir = `#{ENV["LLVM_CONFIG"]} --bindir`.strip
16
- clang = "#{bindir}/clang"
+ clang = if ENV["LLVM_CONFIG"]
+ bindir = `#{ENV["LLVM_CONFIG"]} --bindir`.strip
17
+ "#{bindir}/clang"
18
+ else
19
+ "clang"
20
+ end
21
+
22
output, _status = Open3.capture2e("#{clang} -v -x c -", :stdin_data => "")
23
includes = []
24
output.each_line do |line|
- if line =~ %r{^\s+/.*lib/clang.*/include}
25
+ if line =~ %r{^\s+/(.*usr|.*lib/clang.*)/include}
26
includes << line.strip
27
end
28
0 commit comments