[PATCH] D45442: Parse .h files as objective-c++ if we don't have a compile command.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 11 00:56:01 PDT 2018


ilya-biryukov added inline comments.


================
Comment at: clangd/GlobalCompilationDatabase.cpp:24
+  // Parsing as Objective C++ is friendly to more cases.
+  if (llvm::sys::path::extension(File) == ".h")
+    Argv.push_back("-xobjective-c++-header");
----------------
sammccall wrote:
> ilya-biryukov wrote:
> > Maybe use `.equals_lower(".h")` instead? Just in case.
> .H is (unambiguously) c++, and will be treated as such by clang.
Wasn't aware of that convention, thanks.
In that case, LG


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45442





More information about the cfe-commits mailing list