本机clang信息: $ clang -v -fsyntax-only -x c++ /dev/null
clang version 10.0.0
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
(in-process)
“/usr/local/Cellar/llvm/10.0.0_3/bin/clang-10” -cc1 -triple x86_64-apple-macosx10.15.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name null -mrelocation-model pic -pic-level 2 -mthread-model posix -mframe-pointer=all -fno-rounding-math -masm-verbose -munwind-tables -target-cpu penryn -dwarf-column-info -debugger-tuning=lldb -target-linker-version 556.6 -v -resource-dir /usr/local/Cellar/llvm/10.0.0_3/lib/clang/10.0.0 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -stdlib=libc++ -internal-isystem /usr/local/opt/llvm/bin/…/include/c++/v1 -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/v1 -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/local/include -internal-isystem /usr/local/Cellar/llvm/10.0.0_3/lib/clang/10.0.0/include -internal-externc-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -fdeprecated-macro -fdebug-compilation-dir /Users/donald/coding/cplus -ferror-limit 19 -fmessage-length 123 -stack-protector 1 -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fobjc-runtime=macosx-10.15.0 -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -x c++ /dev/null
clang -cc1 version 10.0.0 based upon LLVM 10.0.0 default target x86_64-apple-darwin19.6.0
ignoring nonexistent directory “/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/v1”
ignoring nonexistent directory “/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/local/include”
ignoring nonexistent directory “/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/Library/Frameworks”
#include “…” search starts here:
#include <…> search starts here:
/usr/local/opt/llvm/bin/…/include/c++/v1
/usr/local/Cellar/llvm/10.0.0_3/lib/clang/10.0.0/include
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks (framework directory)
End of search list.
project root下的.ccls文件内容 $ cat .ccls
clang
%c -std=c11
%cpp -std=c++2a
%h %hpp --include=Global.h
-Iinc
-DMACRO