[PATCH] D73199: [clangd] Errors in TestTU cause test failures unless suppressed with error-ok.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 24 02:08:33 PST 2020
sammccall marked an inline comment as done.
sammccall added inline comments.
================
Comment at: clang-tools-extra/clangd/unittests/TestTU.cpp:84
+ if (llvm::none_of(Files, [](const auto &KV) {
+ return llvm::StringRef(KV.second).contains("error-ok");
+ })) {
----------------
kadircet wrote:
> should we make this more obscure, something like `// TESTTU: error-ok` ?
>
> Even though it sounds implausible, just in case someone spells `error-ok` as part of the test, and silently drops the error :D
I don't think this is the worst or most-likely failure mode, compared to suppressing too many errors.
The extra-verbosity would make it annoying to put inline.
I'd rather switch to clang -verify or otherwise ensure it only suppresses errors on the same line.
But that adds complexity, and this is a strict improvement on what we have today.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73199/new/
https://reviews.llvm.org/D73199
More information about the cfe-commits
mailing list