Bug 1209330 - Get the clang plugin to compile with clang 3.7 and warnings-as-errors. r=mystor

This commit is contained in:
Botond Ballo 2015-09-28 18:52:44 -04:00
parent 3e1e0e3b3f
commit 56e0b97c28

View File

@ -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<ClassTemplateSpecializationDecl>("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 =