[clang] [clang-tools-extra] [llvm] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 6 12:06:33 PST 2024
================
@@ -396,6 +396,15 @@ class VerifyDiagnosticConsumer::MarkerTracker {
}
};
+std::string DetailedErrorString(DiagnosticsEngine &Diags) {
+ std::string ErrDirective;
+ if (Diags.getDiagnosticOptions().VerifyPrefixes.empty())
+ ErrDirective = "expected";
+ else
+ ErrDirective = *Diags.getDiagnosticOptions().VerifyPrefixes.begin();
+ return ErrDirective;
+}
----------------
AaronBallman wrote:
```suggestion
static std::string DetailedErrorString(const DiagnosticsEngine &Diags) {
if (Diags.getDiagnosticOptions().VerifyPrefixes.empty())
return "expected";
return *Diags.getDiagnosticOptions().VerifyPrefixes.begin();
}
```
Some minor changes here but are mostly NFC.
https://github.com/llvm/llvm-project/pull/78338
More information about the cfe-commits
mailing list