[clang] [Clang] FunctionEffects: Make a separate diagnostic group for redeclarations/overrides where effects are implicit. (PR #148690)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 14 14:54:07 PDT 2025


================
@@ -18699,6 +18699,15 @@ bool Sema::CheckOverridingFunctionAttributes(CXXMethodDecl *New,
           QualType ModQT = Context.getFunctionType(NewFT->getReturnType(),
                                                    NewFT->getParamTypes(), EPI);
           New->setType(ModQT);
+          if (Errs.empty()) {
+            // A warning here is somewhat pedantic, in a different warning
+            // group. Skip this if there was already a merge conflict, which is
+            // more serious.
----------------
Sirraide wrote:

```suggestion
            // A warning here is somewhat pedantic. Skip this if there was already 
            // a merge conflict, which is more serious.
```
The code here doesn’t really care about warning groups.

https://github.com/llvm/llvm-project/pull/148690


More information about the cfe-commits mailing list