[PATCH] D50455: Continue emitting diagnostics after a fatal error
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 22 01:21:09 PDT 2018
ilya-biryukov added a comment.
Herald added a subscriber: kadircet.
Sorry for the delay with this one
================
Comment at: unittests/clangd/ClangdTests.cpp:1002
+
+ auto MainFileCI = buildCompilerInvocation(PI);
+ auto AST =
----------------
Just reuse `PreambleCI`?
================
Comment at: unittests/clangd/ClangdTests.cpp:1009
+
+ ASSERT_EQ(AST->getDiagnostics().size(), 4u);
+ EXPECT_THAT(AST->getDiagnostics()[0].Message, HasSubstr("preamble1"));
----------------
Maybe fold all asserts into one, e.g.:
```EXPECT_THAT(AST->getDiagnostics(), ElementsAre(Field(&Diag::Message, HasSubstr("preamble1")), ...)```
Could be made shorter by introducing a matcher for `Field(&Diag::Message, HasSubstr(...`
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50455
More information about the cfe-commits
mailing list