diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-06-07 17:57:59 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-06-07 17:57:59 +0000 |
commit | 4ff3225c1f343c3e0d461a0e387c7c6012cff5ba (patch) | |
tree | eb54ec666e0739513fa9774c8f1ef114dafb5609 /include/clang/Basic/SourceManager.h | |
parent | 54e6c9d1f15153d1756642080866f10a91cc86ea (diff) |
Thread the 'Invalid' out parameter through SourceManager::getSLocEntry() and callees of SourceManager::getSLocEntryByID().
Also add an 'Invalid' check in SourceManager::computeMacroArgsCache().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183538 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index 5fd5a47a4a..9fc4885220 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -1483,7 +1483,7 @@ public: if (Invalid) *Invalid = true; return LocalSLocEntryTable[0]; } - return getSLocEntryByID(FID.ID); + return getSLocEntryByID(FID.ID, Invalid); } unsigned getNextLocalOffset() const { return NextLocalOffset; } @@ -1547,11 +1547,11 @@ private: const SrcMgr::SLocEntry &loadSLocEntry(unsigned Index, bool *Invalid) const; /// \brief Get the entry with the given unwrapped FileID. - const SrcMgr::SLocEntry &getSLocEntryByID(int ID) const { + const SrcMgr::SLocEntry &getSLocEntryByID(int ID, bool *Invalid = 0) const { assert(ID != -1 && "Using FileID sentinel value"); if (ID < 0) - return getLoadedSLocEntryByID(ID); - return getLocalSLocEntry(static_cast<unsigned>(ID)); + return getLoadedSLocEntryByID(ID, Invalid); + return getLocalSLocEntry(static_cast<unsigned>(ID), Invalid); } const SrcMgr::SLocEntry &getLoadedSLocEntryByID(int ID, |