diff options
Diffstat (limited to 'lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/BugReporter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index 5c14eaf284..bceded02de 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -227,13 +227,14 @@ bool BugReporter::RemoveUneededCalls(PathPieces &pieces, BugReport *R, // Recursively clean out the subclass. Keep this call around if // it contains any informative diagnostics. + PathDiagnosticLocation *ThisCallLocation; if (call->callEnterWithin.asLocation().isValid()) - LastCallLocation = &call->callEnterWithin; + ThisCallLocation = &call->callEnterWithin; else - LastCallLocation = &call->callEnter; + ThisCallLocation = &call->callEnter; - assert(LastCallLocation && "Outermost call has an invalid location"); - if (!RemoveUneededCalls(call->path, R, LastCallLocation)) + assert(ThisCallLocation && "Outermost call has an invalid location"); + if (!RemoveUneededCalls(call->path, R, ThisCallLocation)) continue; containsSomethingInteresting = true; |