From: Eli Friedman Date: Sat, 25 Apr 2009 22:20:56 +0000 (+0000) Subject: Silence gcc warnings. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=617bd458600c6d68ffbe1328806b58384bde848a;p=clang Silence gcc warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70086 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index f0c4a089ee..c32aefb830 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -377,8 +377,8 @@ StaticAssertDecl::~StaticAssertDecl() { CXXTempVarDecl *CXXTempVarDecl::Create(ASTContext &C, DeclContext *DC, QualType T) { - assert(T->isDependentType() || - isa(T->getAsRecordType()->getDecl()) && + assert((T->isDependentType() || + isa(T->getAsRecordType()->getDecl())) && "CXXTempVarDecl must either have a dependent type " "or a C++ record type!"); return new (C) CXXTempVarDecl(DC, T); diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp index bab58a2f3f..dc0b57372f 100644 --- a/lib/AST/ExprCXX.cpp +++ b/lib/AST/ExprCXX.cpp @@ -268,7 +268,7 @@ void CXXConstructExpr::Destroy(ASTContext &C) { } CXXDestroyExpr *CXXDestroyExpr::Create(ASTContext &C, VarDecl *vd) { - assert(vd->getKind() == Decl::CXXTempVar || vd->getKind() == Decl::Var && + assert((vd->getKind() == Decl::CXXTempVar || vd->getKind() == Decl::Var) && "Can only create a destroy expr with a temp var decl or a var decl!"); return new (C) CXXDestroyExpr(vd, C.VoidTy); diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp index 7ff473f090..da85a98a19 100644 --- a/lib/Lex/TokenLexer.cpp +++ b/lib/Lex/TokenLexer.cpp @@ -311,7 +311,7 @@ void TokenLexer::Lex(Token &Tok) { bool TokenIsFromPaste = false; // If this token is followed by a token paste (##) operator, paste the tokens! - if (!isAtEnd() && Tokens[CurToken].is(tok::hashhash)) + if (!isAtEnd() && Tokens[CurToken].is(tok::hashhash)) { if (PasteTokens(Tok)) { // When handling the microsoft /##/ extension, the final token is // returned by PasteTokens, not the pasted token. @@ -319,7 +319,7 @@ void TokenLexer::Lex(Token &Tok) { } else { TokenIsFromPaste = true; } - + } // The token's current location indicate where the token was lexed from. We // need this information to compute the spelling of the token, but any