From 75ca7db314d34a14750f18cc35e018f667571f86 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 28 Apr 2016 19:54:51 +0000 Subject: [PATCH] One more fix for use of invalid PresumedLocs missed by r267914. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267926 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/SourceManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp index c2d9e58c29..1e83b63cf8 100644 --- a/lib/Basic/SourceManager.cpp +++ b/lib/Basic/SourceManager.cpp @@ -1394,8 +1394,9 @@ unsigned SourceManager::getExpansionLineNumber(SourceLocation Loc, } unsigned SourceManager::getPresumedLineNumber(SourceLocation Loc, bool *Invalid) const { - if (isInvalid(Loc, Invalid)) return 0; - return getPresumedLoc(Loc).getLine(); + PresumedLoc PLoc = getPresumedLoc(Loc); + if (isInvalid(PLoc, Invalid)) return 0; + return PLoc.getLine(); } /// getFileCharacteristic - return the file characteristic of the specified -- 2.50.1