diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-29 09:15:05 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-29 09:15:25 +0200 |
commit | 733198de1b7fc3907609217147704f493f6146e6 (patch) | |
tree | 1ab5ee016775b53b00a3ccdc43f7bd3a767982b6 /compilerplugins/clang/store | |
parent | 94809ea0d4101679794bb239313c4d73fab30419 (diff) |
Remove support for Clang < 3.4
Change-Id: I81e97c5f720535b33dd3ce72d01151765e4e93a0
Diffstat (limited to 'compilerplugins/clang/store')
-rw-r--r-- | compilerplugins/clang/store/constantfunction.cxx | 1 | ||||
-rw-r--r-- | compilerplugins/clang/store/deletedspecial.cxx | 3 | ||||
-rw-r--r-- | compilerplugins/clang/store/oncevar.cxx | 1 | ||||
-rw-r--r-- | compilerplugins/clang/store/paintmethodconversion.cxx | 1 | ||||
-rw-r--r-- | compilerplugins/clang/store/stdexception.cxx | 13 | ||||
-rw-r--r-- | compilerplugins/clang/store/stylepolice.cxx | 1 |
6 files changed, 2 insertions, 18 deletions
diff --git a/compilerplugins/clang/store/constantfunction.cxx b/compilerplugins/clang/store/constantfunction.cxx index 272c9695dd0b..538191544f80 100644 --- a/compilerplugins/clang/store/constantfunction.cxx +++ b/compilerplugins/clang/store/constantfunction.cxx @@ -8,7 +8,6 @@ */ #include "plugin.hxx" -#include "compat.hxx" #include <iostream> /* diff --git a/compilerplugins/clang/store/deletedspecial.cxx b/compilerplugins/clang/store/deletedspecial.cxx index 5d4c59788413..5610df1da6b4 100644 --- a/compilerplugins/clang/store/deletedspecial.cxx +++ b/compilerplugins/clang/store/deletedspecial.cxx @@ -11,7 +11,6 @@ #include <iterator> #include <string> -#include "compat.hxx" #include "plugin.hxx" // Second-guess that certain private special member function declarations for @@ -58,7 +57,7 @@ void DeletedSpecial::run() { } bool DeletedSpecial::VisitCXXMethodDecl(CXXMethodDecl const * decl) { - if (ignoreLocation(decl) || !compat::isFirstDecl(*decl) || decl->isDefined() + if (ignoreLocation(decl) || !decl->isFirstDecl() || decl->isDefined() || decl->isDefaulted() || decl->getAccess() != AS_private) { return true; diff --git a/compilerplugins/clang/store/oncevar.cxx b/compilerplugins/clang/store/oncevar.cxx index 5c203dfa22e4..e618922a2395 100644 --- a/compilerplugins/clang/store/oncevar.cxx +++ b/compilerplugins/clang/store/oncevar.cxx @@ -12,7 +12,6 @@ #include <map> #include "plugin.hxx" -#include "compat.hxx" #include "clang/AST/CXXInheritance.h" // Idea from tml. diff --git a/compilerplugins/clang/store/paintmethodconversion.cxx b/compilerplugins/clang/store/paintmethodconversion.cxx index 47e410872b35..e19a0f416819 100644 --- a/compilerplugins/clang/store/paintmethodconversion.cxx +++ b/compilerplugins/clang/store/paintmethodconversion.cxx @@ -9,7 +9,6 @@ #include "clang/Lex/Lexer.h" -#include "compat.hxx" #include "plugin.hxx" #include <iostream> #include <fstream> 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); } diff --git a/compilerplugins/clang/store/stylepolice.cxx b/compilerplugins/clang/store/stylepolice.cxx index d2e3af752b98..a0f5373a16a6 100644 --- a/compilerplugins/clang/store/stylepolice.cxx +++ b/compilerplugins/clang/store/stylepolice.cxx @@ -11,7 +11,6 @@ #include <string> #include <set> -#include "compat.hxx" #include "plugin.hxx" // Check for some basic naming mismatches which make the code harder to read |