summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/SourceLocation.cpp
diff options
context:
space:
mode:
authorChristof Douma <Christof.Douma@arm.com>2017-06-19 12:41:22 +0000
committerChristof Douma <Christof.Douma@arm.com>2017-06-19 12:41:22 +0000
commitcc1c112806556e75453e0c9a1dc0f4038aecb4ef (patch)
treed4e0c606067c3b02167ef15e04bd7eff491a85d7 /clang/lib/Basic/SourceLocation.cpp
parent9376007af71753be2ab3e2594fb4159ccd970520 (diff)
downloadbcm5719-llvm-cc1c112806556e75453e0c9a1dc0f4038aecb4ef.tar.gz
bcm5719-llvm-cc1c112806556e75453e0c9a1dc0f4038aecb4ef.zip
Revert "[NFC] Refactor DiagnosticRenderer to use FullSourceLoc"
This reverts commit 305684. This patch breaks extra/tools/clang-tidy llvm-svn: 305688
Diffstat (limited to 'clang/lib/Basic/SourceLocation.cpp')
-rw-r--r--clang/lib/Basic/SourceLocation.cpp70
1 files changed, 0 insertions, 70 deletions
diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp
index 89ddbc946a4..a58d0465a6f 100644
--- a/clang/lib/Basic/SourceLocation.cpp
+++ b/clang/lib/Basic/SourceLocation.cpp
@@ -92,76 +92,6 @@ FullSourceLoc FullSourceLoc::getSpellingLoc() const {
return FullSourceLoc(SrcMgr->getSpellingLoc(*this), *SrcMgr);
}
-FullSourceLoc FullSourceLoc::getFileLoc() const {
- assert(isValid());
- return FullSourceLoc(SrcMgr->getFileLoc(*this), *SrcMgr);
-}
-
-std::pair<FullSourceLoc, FullSourceLoc>
-FullSourceLoc::getImmediateExpansionRange() const {
- assert(isValid());
- std::pair<SourceLocation, SourceLocation> Range =
- SrcMgr->getImmediateExpansionRange(*this);
- return std::make_pair(FullSourceLoc(Range.first, *SrcMgr),
- FullSourceLoc(Range.second, *SrcMgr));
-}
-
-PresumedLoc FullSourceLoc::getPresumedLoc(bool UseLineDirectives) const {
- if (!isValid())
- return PresumedLoc();
-
- return SrcMgr->getPresumedLoc(*this, UseLineDirectives);
-}
-
-bool FullSourceLoc::isMacroArgExpansion(FullSourceLoc *StartLoc) const {
- assert(isValid());
- return SrcMgr->isMacroArgExpansion(*this, StartLoc);
-}
-
-FullSourceLoc FullSourceLoc::getImmediateMacroCallerLoc() const {
- assert(isValid());
- return FullSourceLoc(SrcMgr->getImmediateMacroCallerLoc(*this), *SrcMgr);
-}
-
-std::pair<FullSourceLoc, StringRef> FullSourceLoc::getModuleImportLoc() const {
- if (!isValid())
- return std::make_pair(FullSourceLoc(), StringRef());
-
- std::pair<SourceLocation, StringRef> ImportLoc =
- SrcMgr->getModuleImportLoc(*this);
- return std::make_pair(FullSourceLoc(ImportLoc.first, *SrcMgr),
- ImportLoc.second);
-}
-
-unsigned FullSourceLoc::getFileOffset() const {
- assert(isValid());
- return SrcMgr->getFileOffset(*this);
-}
-
-unsigned FullSourceLoc::getLineNumber(bool *Invalid) const {
- assert(isValid());
- return SrcMgr->getLineNumber(getFileID(), getFileOffset(), Invalid);
-}
-
-unsigned FullSourceLoc::getColumnNumber(bool *Invalid) const {
- assert(isValid());
- return SrcMgr->getColumnNumber(getFileID(), getFileOffset(), Invalid);
-}
-
-std::pair<FullSourceLoc, FullSourceLoc>
-FullSourceLoc::getExpansionRange() const {
- assert(isValid());
- std::pair<SourceLocation, SourceLocation> Range =
- SrcMgr->getExpansionRange(*this);
- return std::make_pair(FullSourceLoc(Range.first, *SrcMgr),
- FullSourceLoc(Range.second, *SrcMgr));
-}
-
-const FileEntry *FullSourceLoc::getFileEntry() const {
- assert(isValid());
- return SrcMgr->getFileEntryForID(getFileID());
-}
-
unsigned FullSourceLoc::getExpansionLineNumber(bool *Invalid) const {
assert(isValid());
return SrcMgr->getExpansionLineNumber(*this, Invalid);
OpenPOWER on IntegriCloud