This revision was automatically updated to reflect the committed changes.
Closed by commit rL307241: [clangd] Add support for per-file extra flags
(authored by krasimir).
Repository:
rL LLVM
https://reviews.llvm.org/D34947
Files:
clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp
clang-to
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM
https://reviews.llvm.org/D34947
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/
krasimir updated this revision to Diff 105274.
krasimir added a comment.
- Address review comment
https://reviews.llvm.org/D34947
Files:
clangd/ClangdLSPServer.cpp
clangd/ClangdUnitStore.cpp
clangd/GlobalCompilationDatabase.cpp
clangd/GlobalCompilationDatabase.h
clangd/Protocol.cpp
ilya-biryukov added a comment.
I forgot to submit this last comment yesterday, sorry about that.
Comment at: clangd/GlobalCompilationDatabase.h:51
+ void addExtraFlagsForFile(PathRef File, std::vector ExtraFlags);
+
Maybe rename to `setExtraFlagsForFile`?
Th
krasimir updated this revision to Diff 105257.
krasimir marked 2 inline comments as done.
krasimir added a comment.
- Addess review comments
https://reviews.llvm.org/D34947
Files:
clangd/ClangdLSPServer.cpp
clangd/ClangdUnitStore.cpp
clangd/GlobalCompilationDatabase.cpp
clangd/GlobalCom
krasimir updated this revision to Diff 105147.
krasimir marked 7 inline comments as done.
krasimir added a comment.
- Addess review comments
https://reviews.llvm.org/D34947
Files:
clangd/ClangdLSPServer.cpp
clangd/ClangdUnitStore.cpp
clangd/GlobalCompilationDatabase.cpp
clangd/GlobalCom
krasimir added inline comments.
Comment at: clangd/GlobalCompilationDatabase.cpp:20
+ const SmallVectorImpl &ExtraFlags) {
+ assert(Command && !Command->CommandLine.empty());
+ if (!Command || ExtraFlags.empty())
ilya-biryukov wrote:
>
ilya-biryukov added inline comments.
Comment at: clangd/GlobalCompilationDatabase.cpp:20
+ const SmallVectorImpl &ExtraFlags) {
+ assert(Command && !Command->CommandLine.empty());
+ if (!Command || ExtraFlags.empty())
Maybe pass `Comman
ilya-biryukov added inline comments.
Comment at: clangd/GlobalCompilationDatabase.cpp:22
+return;
+ if (Command.CommandLine.empty())
+Command.CommandLine.push_back("clang");
If `Command.CommandLine.empty()` is true, extra flags will be added **before**