summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/store/stdexception.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-29 09:15:05 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-29 09:15:25 +0200
commit733198de1b7fc3907609217147704f493f6146e6 (patch)
tree1ab5ee016775b53b00a3ccdc43f7bd3a767982b6 /compilerplugins/clang/store/stdexception.cxx
parent94809ea0d4101679794bb239313c4d73fab30419 (diff)
Remove support for Clang < 3.4
Change-Id: I81e97c5f720535b33dd3ce72d01151765e4e93a0
Diffstat (limited to 'compilerplugins/clang/store/stdexception.cxx')
-rw-r--r--compilerplugins/clang/store/stdexception.cxx13
1 files changed, 1 insertions, 12 deletions
diff --git a/compilerplugins/clang/store/stdexception.cxx b/compilerplugins/clang/store/stdexception.cxx
index 824d6450d0f7..85a589f7abdd 100644
--- a/compilerplugins/clang/store/stdexception.cxx
+++ b/compilerplugins/clang/store/stdexception.cxx
@@ -33,9 +33,6 @@ public:
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
bool VisitCXXMethodDecl(CXXMethodDecl const * decl);
-
-private:
- bool isInMainFile(SourceLocation spellingLocation) const;
};
bool StdException::VisitCXXMethodDecl(CXXMethodDecl const * decl) {
@@ -150,7 +147,7 @@ found:
// (but use the heuristic of assuming pure virtual functions do
// not have definitions):
if (rewriter != nullptr
- && (isInMainFile(
+ && (compiler.getSourceManager().isInMainFile(
compiler.getSourceManager().getSpellingLoc(loc))
|| decl->isDefined() || decl->isPure())
&& insertTextAfterToken(
@@ -184,14 +181,6 @@ found:
return true;
}
-bool StdException::isInMainFile(SourceLocation spellingLocation) const {
-#if CLANG_VERSION >= 30400
- return compiler.getSourceManager().isInMainFile(spellingLocation);
-#else
- return compiler.getSourceManager().isFromMainFile(spellingLocation);
-#endif
-}
-
loplugin::Plugin::Registration<StdException> X("stdexception", true);
}