ilya-biryukov added a comment.

ObjC++ definitely seems like a nicer default. Unfortunately, we'll start 
getting ObjC++ completion results, which may be confusing. But that seems like 
a smaller evil.

Is there an easy way to add a regression test that checks we don't get any 
errors for headers without compile command with C++/ObjC++ code?



================
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");
----------------
Maybe use `.equals_lower(".h")` instead? Just in case.


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