[llvm] [clang-tools-extra] [clang] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)
Shourya Goel via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 10:11:08 PST 2024
================
@@ -1098,7 +1098,14 @@ 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 Err_Directive;
+ if (Diags.getDiagnosticOptions().VerifyPrefixes.empty()) {
+ Err_Directive = "expected";
+ } else {
+ Err_Directive = *Diags.getDiagnosticOptions().VerifyPrefixes.begin();
+ }
+ Diags.Report(diag::err_verify_no_directives).setForceEmit()
+ << Err_Directive;
----------------
Sh0g0-1758 wrote:
Please let me know if we are doing this also in this PR. I think its best to raise a separate issue for the same as LLVM PR standards imply.
https://github.com/llvm/llvm-project/pull/78338
More information about the llvm-commits
mailing list