From 56e0b97c28f9281775c900e504f2dbd42f631f26 Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Mon, 28 Sep 2015 18:52:44 -0400 Subject: [PATCH] Bug 1209330 - Get the clang plugin to compile with clang 3.7 and warnings-as-errors. r=mystor --- build/clang-plugin/clang-plugin.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/build/clang-plugin/clang-plugin.cpp b/build/clang-plugin/clang-plugin.cpp index d7714df33e4..90abcfcc117 100644 --- a/build/clang-plugin/clang-plugin.cpp +++ b/build/clang-plugin/clang-plugin.cpp @@ -30,14 +30,6 @@ typedef ASTConsumer *ASTConsumerPtr; namespace { -QualType GetCallReturnType(const CallExpr *expr) { -#if CLANG_VERSION_FULL >= 307 - return expr->getCallReturnType(expr->getCalleeDecl()->getASTContext()); -#else - return expr->getCallReturnType(); -#endif -} - using namespace clang::ast_matchers; class DiagnosticsMatcher { public: @@ -503,13 +495,6 @@ const FieldDecl *getClassRefCntMember(const CXXRecordDecl *D) { return 0; } -const FieldDecl *getClassRefCntMember(QualType T) { - while (const ArrayType *arrTy = T->getAsArrayTypeUnsafe()) - T = arrTy->getElementType(); - CXXRecordDecl *clazz = T->getAsCXXRecordDecl(); - return clazz ? getClassRefCntMember(clazz) : 0; -} - const FieldDecl *getBaseRefCntMember(QualType T); const FieldDecl *getBaseRefCntMember(const CXXRecordDecl *D) { @@ -1317,8 +1302,6 @@ void DiagnosticsMatcher::NonMemMovableChecker::run( const ClassTemplateSpecializationDecl *specialization = Result.Nodes.getNodeAs("specialization"); SourceLocation requestLoc = specialization->getPointOfInstantiation(); - const CXXRecordDecl *templ = - specialization->getSpecializedTemplate()->getTemplatedDecl(); // Report an error for every template argument which is non-memmovable const TemplateArgumentList &args =