diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-04-28 19:54:51 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-04-28 19:54:51 +0000 |
| commit | 9c52767f362457d0cbd76292988a9a103d7f35bf (patch) | |
| tree | 4bfa315519501d7e4e08845038a0467790b92f32 | |
| parent | e5fcce2d2b0a9ff048bc8f6aa0bb776a18a671c2 (diff) | |
| download | bcm5719-llvm-9c52767f362457d0cbd76292988a9a103d7f35bf.tar.gz bcm5719-llvm-9c52767f362457d0cbd76292988a9a103d7f35bf.zip | |
One more fix for use of invalid PresumedLocs missed by r267914.
llvm-svn: 267926
| -rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index c2d9e58c295..1e83b63cf82 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/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 |

