sammccall added a comment.

Added a unit test, and cleaned up a couple of things to make it pass:

- GlobalCompilationDatabase.h wasn't self-contained due to incomplete types
- testPath() isn't very usable with subdirectories on windows



================
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");
----------------
ilya-biryukov wrote:
> 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
Yeah .C/.H is rare these days I think. (But present in Driver/Types.cpp)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45442



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to