[PATCH] D43122: [clangd] Fix crash when CompilerInvocation can't be created.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 9 05:26:07 PST 2018
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
just nits
================
Comment at: clangd/ClangdUnit.cpp:417
}
assert(CI && "Couldn't create CompilerInvocation");
----------------
remove?
================
Comment at: unittests/clangd/ClangdTests.cpp:47
+
+// Checks there is an error and marks it as handled.
+#define EXPECT_ERROR(expectedValue) \
----------------
doc that this consumes Expected<T>
================
Comment at: unittests/clangd/ClangdTests.cpp:48
+// Checks there is an error and marks it as handled.
+#define EXPECT_ERROR(expectedValue) \
+ do { \
----------------
This helper should go in Matchers.h I think
================
Comment at: unittests/clangd/ClangdTests.cpp:52
+ if (ComputedValue) { \
+ ADD_FAILURE() << "expected an error"; \
+ break; \
----------------
More context:
```<< " from " << #expectedValue << " but got " << ::testing::PrintToString(*ComputedValue)```
(please check the error message works!)
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D43122
More information about the cfe-commits
mailing list