https://github.com/5chmidti commented:

The implementation is basically LGTM, but I'd prefer if we can make the 
`literal` part of the message when adding a comment optional. The init 
lists/ctors are not really literals. E.g., `shouldAddComment` could return an 
enum or string and the diag message could dispatch to `literal`, and for the 
initiatlizers maybe `temporary` with `%select`.

I think the check docs should be slightly revised to say that both mismatched 
comments and optionally enabled missing comments for literals and some 
constructed temporaries.

Regarding what @localspook brought up about diagnosing `Foo{}` but not `Foo()`, 
I think we should be diagnosing both as well. While I think most of the time 
the type will suffice, if a user has the option to diagnose `Foo{}` but not 
`Foo()`, I can already see the issue open by next release.

https://github.com/llvm/llvm-project/pull/180408
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to