[clang-tools-extra] [llvm] [clang] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)
Shourya Goel via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 22 09:50:15 PST 2024
================
@@ -1098,7 +1098,16 @@ void VerifyDiagnosticConsumer::CheckDiagnostics() {
// Produce an error if no expected-* directives could be found in the
// source file(s) processed.
if (Status == HasNoDirectives) {
- Diags.Report(diag::err_verify_no_directives).setForceEmit();
+ std::string directives;
+ for (auto &Prefix : Diags.getDiagnosticOptions().VerifyPrefixes) {
+ directives = directives + Prefix + ",";
+ }
----------------
Sh0g0-1758 wrote:
I think the one I implemented is a better option as it batched the same types of errors into one and gave the programmer a concise view of the error.
https://github.com/llvm/llvm-project/pull/78338
More information about the llvm-commits
mailing list