xazax.hun added a comment.

In https://reviews.llvm.org/D37437#860311, @NoQ wrote:

> Cool. Thanks!
>
> > In the future probably it would be better to alter the signature of the 
> > checkers' constructor to set the name in the constructor so it is possible 
> > to create the BugType eagerly.
>
> Still, should we add an assertion so that we could be sure that every bug 
> type contains a checker name?


Sure! I added the assert and discovered lots of other checks that had the same 
problem. I also discovered some other bugs, e.g.: when a checker was emitting 
diagnostic even without being turned on or the wrong name is emitted to the 
plist.



================
Comment at: test/Analysis/malloc.c:1723
 
-char *dupstrWarn(const char *s) {
-  const int len = strlen(s);
----------------
This test is deleted because the corresponding checker is not even turned on 
for this file and this warning should not be emitted at all. Emitting this 
warning with the settings above was a bug. 


https://reviews.llvm.org/D37437



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

Reply via email to