ASDenysPetrov added a comment.

@NoQ

> You're on the right track but your checker repeats `PthreadLockChecker` 
> word-by-word. Like, you can find answers to all your questions (eg., "how to 
> use `isLiveRegion`?") by reading that checker. C++ functions aren't any 
> different from C functions; that's an extremely minor difference that doesn't 
> justify developing a new checker from scratch.

Thanks. I've already looked through PthreadLockChecker. Yes, it's pretty 
similar. I'll keep working separately for a while though as I feel more 
comfortable making mistakes.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/ThreadPrimitivesChecker.cpp:34
+
+static const std::pair<FuncIdKind, CallDescription> FuncMapping[]{
+    {Mutex_Lock, {{"std", "mutex", "lock"}, 0, 0}},
----------------
NoQ wrote:
> `CallDescriptionMap` is the modern API for this stuff.
Thanks. I'll look.


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

https://reviews.llvm.org/D85431

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

Reply via email to