Szelethus added a comment.

> How then do you think I should try matching the IntPointerArray example? I am 
> now leaning towards not doing this via AST Matchers as I am not sure if I can 
> easily match more complex cases.

I've sadly reached the end of my knowledge on AST based analysis, but just to 
throw this in there, are you aware of this amazing guide about the static 
analyzer? https://github.com/haoNoQ/clang-analyzer-guide/releases There are a 
couple sections I believe could help you.



================
Comment at: lib/StaticAnalyzer/Checkers/PointerSortingChecker.cpp:108-110
+void ento::registerPointerSortingChecker(CheckerManager &Mgr) {
+  Mgr.registerChecker<PointerSortingChecker>();
+}
----------------
whisperity wrote:
> Speaking of not being applicable to C code, I think this snippet here should 
> allow you to skip running the checker if you are not on a C++ file:
> 
> ```
> if (!Mgr.getLangOpts().CPlusPlus)
>       return;
> ```
Actually, I'm very much shooting in the dark here, but wouldn't this work with 
objective C++?


https://reviews.llvm.org/D50488



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

Reply via email to