[PATCH] D12761: MPI-Checker patch for Clang Static Analyzer

Alexander Droste via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 19 11:36:36 PDT 2015


Alexander_Droste updated this revision to Diff 35175.
Alexander_Droste marked an inline comment as done.
Alexander_Droste added a comment.

Meanwhile, I sketched a BugReportVisitor class for the 'double wait' check called 
DoubleWaitVisitor which I modeled as a nested class of MPIBugReporter. 
Currently, the retrieval of requests always fails in VisitNode(). (see // This is never reached...)
I'm not sure what's wrong, as I set up the class in the same way as presented in other checkers.
Maybe I overlooked something.

Further, I have some questions about the BugReportVisitor mechanism:

1.

Why does the BugReportVisitor have a Profile() function?

1.

// Why is this pattern used in most BugReporterVisitorImpl subclasses in the Profile() function?
static int X = 0;
ID.AddPointer(&X);

1.

Does the function calling VisitNode() traverse backwards in the graph, as long as nullptr is returned?


http://reviews.llvm.org/D12761

Files:
  tools/clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
  tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/Container.h
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPICheckerAST.cpp
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPICheckerAST.h
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPICheckerPathSensitive.cpp
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPICheckerPathSensitive.h
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIFunctionClassifier.cpp
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIFunctionClassifier.h
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPITypes.h
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/TranslationUnitVisitor.cpp
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/TranslationUnitVisitor.h
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/TypeVisitor.h
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/Utility.cpp
  tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/Utility.h
  tools/clang/test/Analysis/MPIChecker.cpp
  tools/clang/unittests/StaticAnalyzer/CMakeLists.txt
  tools/clang/unittests/StaticAnalyzer/MPI-Checker/CMakeLists.txt
  tools/clang/unittests/StaticAnalyzer/MPI-Checker/ContainerTest.cpp
  tools/clang/unittests/StaticAnalyzer/MPI-Checker/UtilityTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12761.35175.patch
Type: text/x-patch
Size: 112473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150919/c94ee84e/attachment-0001.bin>


More information about the cfe-commits mailing list