================ @@ -2073,6 +2073,18 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { Warnings.emplace_back(std::move(Warning), getNotes()); } + void handleAttributeMismatch(const NamedDecl *ThisDecl, + const NamedDecl *PrevDecl) override { + PartialDiagnosticAt Warning(ThisDecl->getLocation(), + S.PDiag(diag::warn_attribute_mismatch) + << ThisDecl); + Warnings.emplace_back(std::move(Warning), getNotes()); + + PartialDiagnosticAt Note(PrevDecl->getLocation(), + S.PDiag(diag::note_previous_decl) << PrevDecl); + Warnings.emplace_back(std::move(Note), getNotes()); ---------------- aaronpuchert wrote:
The problem is likely here. You shouldn't add the note as a warning, but as a note to the corresponding warning: ```suggestion PartialDiagnosticAt Note(PrevDecl->getLocation(), S.PDiag(diag::note_previous_decl) << PrevDecl); Warnings.emplace_back(std::move(Warning), getNotes(Note)); ``` https://github.com/llvm/llvm-project/pull/67520 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits