diff options
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp index d64aa39febe..38069a56ac7 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/clang/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; |