[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

2021-10-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D107613#3040402 , @dschuff wrote: > It looks like this error is intended to catch mismatches for attributes that > can affect codegen such as noreturn (in which case it makes sense to have it > as an error) but it als

[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

2021-10-04 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. It looks like this error is intended to catch mismatches for attributes that can affect codegen such as noreturn (in which case it makes sense to have it as an error) but it also now fires for cases such as `__attribute__(warning())` which often do not duplicate the att

[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

2021-08-06 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd238b6028582: [Clang][DiagnosticSemaKinds] combine diagnostic texts (authored by nickdesaulniers). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107613/new/

[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

2021-08-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Comment at: clang/lib/Sema/SemaDecl.cpp:3686 +Diag(Old->getLocation(), diag::note_previous_declaration); + } nickdesaulniers wrote: > should `CXX11NoReturnAttr` be `dropAt

[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

2021-08-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:3686 +Diag(Old->getLocation(), diag::note_previous_declaration); + } should `CXX11NoReturnAttr` be `dropAttr` on `New` like the other cases, too? Repository: rG LLVM

[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

2021-08-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 364858. nickdesaulniers edited the summary of this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. - more use of note_previous_declaration, fix WeakImportAttr, too Repository: rG LLVM Github Monorepo CHA

[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

2021-08-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers planned changes to this revision. nickdesaulniers added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:3685 +<< NRA; +notePreviousDefinition(Old, New->getLocation()); + } aaron.ballman wrote: > nickdesaulniers wr

[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

2021-08-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:3685 +<< NRA; +notePreviousDefinition(Old, New->getLocation()); + } nickdesaulniers wrote: > ah, this isn't quite right. It replaces warning of the first declar

[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

2021-08-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:3685 +<< NRA; +notePreviousDefinition(Old, New->getLocation()); + } ah, this isn't quite right. It replaces warning of the first declaration with warning of

[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

2021-08-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 364838. nickdesaulniers marked 2 inline comments as done. nickdesaulniers added a comment. - prefer getAttr to hasAttr+getAttr, remove another diag Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107613/ne

[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

2021-08-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM with some minor tweaks to avoid `hasAttr` followed by `getAttr`. Thanks! Comment at: clang/lib/Sema/SemaDecl.cpp:3356-3359 if (New->hasAttr() &&

[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

2021-08-05 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added a reviewer: aaron.ballman. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The diagnostic texts for warning on attributes that don't appear on the initial declarat