NoQ added a comment.

Yay, C11 as well!!

> If you have any idea how to reduce this boilerplate I'd like to know :)

I don't see any immediate solutions to the boilerplate that don't consist in 
introducing better checker APIs. Eg., we could have introduced a `LazyBugType` 
- a wrapper around `Optional<BugType>` that'd take description immediately but 
create the actual bug type only once the checker name is known, or we could 
make a `MultiCallDescriptionMap` that'd prevent us from both splitting up the 
map and writing down an extra piece of information on every line. But these are 
big and very much non-K.I.S.S. endeavors.

> I had to add a dummy check that can always be enabled. Otherwise, 
> `CheckerManager::getChecker` would trigger an assertion fail due to 
> attempting to get a checker that was potentially not enabled.

You mean `PthreadLockBase`? I think that's how @Szelethus intended to have such 
checker hierarchies to work.

> I plan to add more tests

Yes please! :D



================
Comment at: clang/test/Analysis/c11lock.c:1
+// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.unix.C11Lock -verify %s
+
----------------
I wouldn't mind `alpha.core` given that these functions belong to the standard 
library.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73376



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

Reply via email to