whisperity added a subscriber: martong.
whisperity added a comment.

Make sure you use only the C++ projects like BitCoin, LLVM/Clang, ProtoBuf and 
such from the Xazax CSA Test suite because this checker is not really 
applicable to C projects.

Generally I like the idea (personally I've ran into a similar issue to ordering 
of sets in Java missed and on another OS we failed the tests where they tried 
to stringify elements and compare the output...) very much, this is one of 
those subleties you can really miss when writing and when reviewing code, and 
it will only bite you in the ass months down the line.

I think I'll summon @martong here, //ASTMatchers// are not my fortée, but he 
has been tinkering with them much recently.



================
Comment at: lib/StaticAnalyzer/Checkers/PointerSortingChecker.cpp:108-110
+void ento::registerPointerSortingChecker(CheckerManager &Mgr) {
+  Mgr.registerChecker<PointerSortingChecker>();
+}
----------------
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;
```


Repository:
  rC Clang

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