[PATCH] D132952: [Sema] disable -Wvla for function array parameters

YingChi Long via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 30 09:12:26 PDT 2022


inclyc added inline comments.


================
Comment at: clang/include/clang/Sema/Sema.h:1760
+    // Special builder emitting no diagnostics
+    SemaDiagnosticBuilder(Sema &S) : S(S) {}
     SemaDiagnosticBuilder(Kind K, SourceLocation Loc, unsigned DiagID,
----------------
erichkeane wrote:
> I haven't looked particularly closely, but this doesn't seem right to me.  There is already the 'K_Nop' diagnostic Kind (see the line below), that we should look at the uses of.
I've tried using the following constructor, I have to to pass in a series of redundant parameters (such as `DiagID` and `Loc`), which makes it strange to construct a Builder emitting no error message at all?

e.g.

```
Sema::SemaDiagnosticBuilder(Sema::SemaDiagnosticBuilder::Kind::K_Nop, Loc, 0,
                          nullptr, S);
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132952/new/

https://reviews.llvm.org/D132952



More information about the cfe-commits mailing list