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

Alexander Droste via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 25 07:09:31 PDT 2015


Alexander_Droste updated this revision to Diff 35718.
Alexander_Droste added a comment.

- changed RequestMap so that the same is used across translation units
- usage of a BugReporterVisitor in reportMissingWait, reportDoubleWait, reportDoubleNonblocking (reportUnmatchedWait needs no visitor)
- based missingWait check on checkDeadSymbol callback
- doubleWaits & doubleNonblocking errors where the 'same' function uses a request twice (e.g. in a loop) got a specific diagnostic, to make the report easily understandable
- fine grained guard in checkDoubleNonblocking & checkWaitUsage

- generalized variable name retrieval (for memory region)
- handle multidimensional arrays in variable name retrieval (for memory region)

- added/adapted integration tests
- removed some helper functions in MPIBugReporter and Utility
- removed UtilityTest.cpp

- - - - - - - - - -

One thing that is still not perfect, is where the last part of the diagnostic 
is presented for missing waits. This does not consistently seem to be the end of the scope
of the request (the point where the symbol dies). I compared this with the malloc checker which has 
the same behavior. The last diagnostic seems to be presented after the next statement below the last function,
marked by the BugReportVisitor, using the request/memory. I think it would be nice if the last
part of the diagnostic would be presented at the end of the scope.


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12761.35718.patch
Type: text/x-patch
Size: 112507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150925/30f79e2d/attachment-0001.bin>


More information about the cfe-commits mailing list