From 733198de1b7fc3907609217147704f493f6146e6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 29 Jun 2016 09:15:05 +0200 Subject: Remove support for Clang < 3.4 Change-Id: I81e97c5f720535b33dd3ce72d01151765e4e93a0 --- compilerplugins/clang/store/stdexception.cxx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'compilerplugins/clang/store/stdexception.cxx') 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 X("stdexception", true); } -- cgit