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

2018-04-20 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330418: Parse .h files as objective-c++ if we dont have a compile command. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

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

2018-04-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. Herald added a subscriber: jkorous. LGTM Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45442 ___ cfe-commits

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

2018-04-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. @ilya-biryukov Ping :-) 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

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

2018-04-11 Thread Sam McCall via Phabricator via cfe-commits
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:

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

2018-04-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 141957. sammccall added a comment. Herald added a subscriber: mgorny. Add test, shave required yaks Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45442 Files: clangd/GlobalCompilationDatabase.cpp clangd/GlobalCompilationDatabase.h

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

2018-04-11 Thread Ilya Biryukov via Phabricator via cfe-commits
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: >

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

2018-04-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Will try to add a test. 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");

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

2018-04-10 Thread Ilya Biryukov via Phabricator via cfe-commits
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

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

2018-04-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, ioeric, jkorous-apple, klimek. This makes C++/objC not totally broken, without hurting C files too much. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45442