Skip to content

Instantly share code, notes, and snippets.

@herrgahr
Created February 23, 2020 14:57
Show Gist options
  • Save herrgahr/9f437dd273392e8e13e0c75125859693 to your computer and use it in GitHub Desktop.
Save herrgahr/9f437dd273392e8e13e0c75125859693 to your computer and use it in GitHub Desktop.
## I had to explicitly add gcc's include paths, otherwise it wouldn't find the C stdlib headers (even though I placed my clang=query in /usr/bin)
## to find out what to add in your case, see the output of:
# echo | g++ -E -Wp,-v -
## which, in my case, gives:
## ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.1/../../../../x86_64-pc-linux-gnu/include"
## #include "..." search starts here:
## #include <...> search starts here:
## /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.1/include
## /usr/local/include
## /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.1/include-fixed
## /usr/include
## End of search list.
clang-query -p build apps/openmw-mp/Script/ScriptFunctions.cpp --extra-arg="-I/usr/lib64/gcc/x86_64-pc-linux-gnu/9.2.1/include" --extra-arg=-I/usr/lib64/gcc/x86_64-pc-linux-gnu/9.2.1/include-fixed -f=query > res2.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment