[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370177: [clangd] Surface errors from command-line parsing (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66759/new/ https://reviews.llvm.org/D66759 __

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 217581. ilya-biryukov added a comment. - Remove accidental change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66759/new/ https://reviews.llvm.org/D66759 Files: clang-tools-extra/clangd/ClangdServer.c

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:465 +Diags.insert(Diags.end(), Preamble->Diags.begin(), Preamble->Diags.end()); + // Finally, add diagnostics coming from the AST. + { kadircet wrote: > ilya-biryukov w

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 217579. ilya-biryukov marked 2 inline comments as done and an inline comment as not done. ilya-biryukov added a comment. - Do not flushDiag() on EndSourceFile - Do not reset WasAdjusted outside flusLastDiag() - Add a test that unknown warnings do not pr

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:465 +Diags.insert(Diags.end(), Preamble->Diags.begin(), Preamble->Diags.end()); + // Finally, add diagnostics coming from the AST. + { ilya-biryukov wrote: > kadircet wrote:

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. Just to clarify: we only want to surface errors, not warnings from command-line to avoid too much nosie; I'm totally on board with not spamming users with "unknown compiler warning" errors at the start of each file. W

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D66759#1646599 , @ilya-biryukov wrote: > How common is this? Do we have any particular examples? Well, I don't have any data to prove, but my experience has been so far; most of the people don't touch Makefiles apart from a

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D66759#1646509 , @kadircet wrote: > Thanks! This looks really useful when we can't build an AST due to unknown > compiler commands, but I am not sure about how useful it is to surface > command-line parsing errors once w

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Thanks! This looks really useful when we can't build an AST due to unknown compiler commands, but I am not sure about how useful it is to surface command-line parsing errors once we are able to build an AST. Because people most likely won't care about these errors once

[PATCH] D66759: [clangd] Surface errors from command-line parsing

2019-08-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, javed.absar. Herald added a project: clang. ilya-biryukov added a parent revision: D66731: [Driver] Add an option for createInvocationFromCommandLine to recover on e