aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/BugReporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/BugReporter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp
index d64aa39feb..38069a56ac 100644
--- a/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -264,16 +264,19 @@ static void adjustCallLocations(PathPieces &Pieces,
}
if (LastCallLocation) {
- if (!Call->callEnter.asLocation().isValid())
+ if (!Call->callEnter.asLocation().isValid() ||
+ Call->getCaller()->isImplicit())
Call->callEnter = *LastCallLocation;
- if (!Call->callReturn.asLocation().isValid())
+ if (!Call->callReturn.asLocation().isValid() ||
+ Call->getCaller()->isImplicit())
Call->callReturn = *LastCallLocation;
}
// Recursively clean out the subclass. Keep this call around if
// it contains any informative diagnostics.
PathDiagnosticLocation *ThisCallLocation;
- if (Call->callEnterWithin.asLocation().isValid())
+ if (Call->callEnterWithin.asLocation().isValid() &&
+ !Call->getCallee()->isImplicit())
ThisCallLocation = &Call->callEnterWithin;
else
ThisCallLocation = &Call->callEnter;