[PATCH] D21081: MPI-Checker patch for Clang Static Analyzer
Devin Coughlin via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 12 11:40:59 PDT 2016
dcoughlin updated this revision to Diff 60472.
dcoughlin added a comment.
Alexander, a drawback with using keeping a vector of MPIBugReporters in the checker is that this will essentially "leak" all the created bug reporters.
How about this instead:
- Remove MPIBugReporter's MPIFunctionClassifier constructor parameter (it doesn't use it anyway)
- Have MPIBugReporter be a value-level field of MPIChecker (that is, not a pointer). This ties the lifetime of its contained BugTypes to the checker, which fixes the ASan issue you were seeing and matches the behavior of other checkers.
- Pass the clang::ento::BugReporter instance for the reporting context to MPIBugReporter's reporting methods rather storing it in MPIBugReporter (this should fix the ASan issue I was seeing).
I've updated with a proposed diff. What do you think?
http://reviews.llvm.org/D21081
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
lib/StaticAnalyzer/Checkers/CMakeLists.txt
lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp
lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h
lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp
lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.h
lib/StaticAnalyzer/Checkers/MPI-Checker/MPIFunctionClassifier.cpp
lib/StaticAnalyzer/Checkers/MPI-Checker/MPIFunctionClassifier.h
lib/StaticAnalyzer/Checkers/MPI-Checker/MPITypes.h
lib/StaticAnalyzer/Core/MemRegion.cpp
test/Analysis/MPIMock.h
test/Analysis/MemRegion.cpp
test/Analysis/mpichecker.cpp
test/Analysis/mpicheckernotes.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21081.60472.patch
Type: text/x-patch
Size: 59887 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160612/64c6422a/attachment-0001.bin>
More information about the cfe-commits
mailing list