diff --git a/Project-Setup.md b/Project-Setup.md index 33239c9..997f52c 100644 --- a/Project-Setup.md +++ b/Project-Setup.md @@ -162,6 +162,11 @@ Objective-C (`%objective-c`), or Objective-C++ (`%objective-c++`) files. This argument should be added only when indexing C header files (`%h`: `*.h`) or C++ header files (`%hpp`: `*.hh` `*.hpp`). Note, `*.h` files are considered as C, not C++. +You may add a line `%h -x c++-header` to make every `*.h` parsed as C++. + +Note, if your project has both C and C++ files, `a.h`'s flags may be inferred from a C file and thus parsed as C. +You may run into parsing errors like `unknown type name 'class'`. + ### Compiler driver The compiler driver (the first line unless `%compile_commands.json` is used) can usually just be `clang`.