diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-12-19 01:16:49 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-12-19 01:16:49 +0000 |
commit | 6ee225c8d4381e728c73252ed589f13e9f546def (patch) | |
tree | 9f2767c2d213071b0333024705cd0c0c46030935 /lib/Frontend | |
parent | e3ec31a6c2ff37bbc1ebea523e9f1730e0b4b1c7 (diff) |
Simplify logic to use SourceManager::getFileLoc(), per Argyrios's feedback.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r-- | lib/Frontend/DiagnosticRenderer.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Frontend/DiagnosticRenderer.cpp b/lib/Frontend/DiagnosticRenderer.cpp index 88a8706731..d540964b64 100644 --- a/lib/Frontend/DiagnosticRenderer.cpp +++ b/lib/Frontend/DiagnosticRenderer.cpp @@ -153,10 +153,8 @@ void DiagnosticRenderer::emitDiagnostic(SourceLocation Loc, SourceLocation UnexpandedLoc = Loc; - // Perform the same walk as emitMacroExpansions, to find the ultimate - // expansion location for the diagnostic. - while (Loc.isMacroID()) - Loc = SM->getImmediateMacroCallerLoc(Loc); + // Find the ultimate expansion location for the diagnostic. + Loc = SM->getFileLoc(Loc); PresumedLoc PLoc = SM->getPresumedLoc(Loc, DiagOpts->ShowPresumedLoc); |