Alexander_Droste added inline comments. ================ Comment at: lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp:96 @@ +95,3 @@ + if (const CallExpr *CE = clang::dyn_cast<CallExpr>(SP->getStmt())) { + + auto FuncIdentifier = CE->getDirectCallee()->getIdentifier(); ---------------- zaks.anna wrote: > The advantage of using the state is that it will be much more robust to any > further changes to the compiler/checker because you will not be pattern > matching the AST but instead will be checking the state, which the core > reasoning is based on. One example that comes to mind is indirect calls. You > will reduce the amount of code here as well, simplifying maintainability. > This is the pattern we use in other checkers as well, so there is a remote > chance we could introduce a new simplified API that will do the walk for the > checker writers. > > With respect to your example. Does it come up in practice? Wouldn't you warn > on the second nonblocking request anyway? Could you add such an example to > the tests? (Would be good in any case. If you leave the code as is, you can > point to that example as the motivation.) I'll change this to the pattern you suggested.
>With respect to your example. Does it come up in practice? It's for sure a little contrived. >Wouldn't you warn on the second nonblocking request anyway? Yes. >Could you add such an example to the tests? Sure. http://reviews.llvm.org/D12761 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits