Thread safety analysis: add -Wthread-safety-verbose flag, which adds additional notes that are helpful when compiling statistics on thread safety warnings.
llvm-svn: 215677
This commit is contained in:
@@ -1810,6 +1810,7 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
|
||||
|
||||
CFG *CFGraph = walker.getGraph();
|
||||
const NamedDecl *D = walker.getDecl();
|
||||
const FunctionDecl *CurrentFunction = dyn_cast<FunctionDecl>(D);
|
||||
CurrentMethod = dyn_cast<CXXMethodDecl>(D);
|
||||
|
||||
if (D->hasAttr<NoThreadSafetyAnalysisAttr>())
|
||||
@@ -1824,6 +1825,8 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
|
||||
if (isa<CXXDestructorDecl>(D))
|
||||
return; // Don't check inside destructors.
|
||||
|
||||
Handler.enterFunction(CurrentFunction);
|
||||
|
||||
BlockInfo.resize(CFGraph->getNumBlockIDs(),
|
||||
CFGBlockInfo::getEmptyBlockInfo(LocalVarMap));
|
||||
|
||||
@@ -2079,6 +2082,8 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
|
||||
LEK_LockedAtEndOfFunction,
|
||||
LEK_NotLockedAtEndOfFunction,
|
||||
false);
|
||||
|
||||
Handler.leaveFunction(CurrentFunction);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user