diff --git a/clang/include/clang/Basic/SourceLocation.h b/clang/include/clang/Basic/SourceLocation.h index 5b7f877200f7..f7ea331e1cc7 100644 --- a/clang/include/clang/Basic/SourceLocation.h +++ b/clang/include/clang/Basic/SourceLocation.h @@ -200,11 +200,11 @@ public: FullSourceLoc getInstantiationLoc() const; FullSourceLoc getSpellingLoc() const; - unsigned getInstantiationLineNumber() const; - unsigned getInstantiationColumnNumber() const; + unsigned getInstantiationLineNumber(bool *Invalid = 0) const; + unsigned getInstantiationColumnNumber(bool *Invalid = 0) const; - unsigned getSpellingLineNumber() const; - unsigned getSpellingColumnNumber() const; + unsigned getSpellingLineNumber(bool *Invalid = 0) const; + unsigned getSpellingColumnNumber(bool *Invalid = 0) const; const char *getCharacterData(bool *Invalid = 0) const; diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp index 5ccd73171e2e..7412b955606a 100644 --- a/clang/lib/Basic/SourceLocation.cpp +++ b/clang/lib/Basic/SourceLocation.cpp @@ -80,24 +80,24 @@ FullSourceLoc FullSourceLoc::getSpellingLoc() const { return FullSourceLoc(SrcMgr->getSpellingLoc(*this), *SrcMgr); } -unsigned FullSourceLoc::getInstantiationLineNumber() const { +unsigned FullSourceLoc::getInstantiationLineNumber(bool *Invalid) const { assert(isValid()); - return SrcMgr->getInstantiationLineNumber(*this); + return SrcMgr->getInstantiationLineNumber(*this, Invalid); } -unsigned FullSourceLoc::getInstantiationColumnNumber() const { +unsigned FullSourceLoc::getInstantiationColumnNumber(bool *Invalid) const { assert(isValid()); - return SrcMgr->getInstantiationColumnNumber(*this); + return SrcMgr->getInstantiationColumnNumber(*this, Invalid); } -unsigned FullSourceLoc::getSpellingLineNumber() const { +unsigned FullSourceLoc::getSpellingLineNumber(bool *Invalid) const { assert(isValid()); - return SrcMgr->getSpellingLineNumber(*this); + return SrcMgr->getSpellingLineNumber(*this, Invalid); } -unsigned FullSourceLoc::getSpellingColumnNumber() const { +unsigned FullSourceLoc::getSpellingColumnNumber(bool *Invalid) const { assert(isValid()); - return SrcMgr->getSpellingColumnNumber(*this); + return SrcMgr->getSpellingColumnNumber(*this, Invalid); } bool FullSourceLoc::isInSystemHeader() const {