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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to