]> granicus.if.org Git - clang/commitdiff
Silence gcc warnings.
authorEli Friedman <eli.friedman@gmail.com>
Sat, 25 Apr 2009 22:20:56 +0000 (22:20 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sat, 25 Apr 2009 22:20:56 +0000 (22:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70086 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclCXX.cpp
lib/AST/ExprCXX.cpp
lib/Lex/TokenLexer.cpp

index f0c4a089ee5875b58542052ed40497fcb8b8fe38..c32aefb830b1656c742e34508a4d0f118e66df42 100644 (file)
@@ -377,8 +377,8 @@ StaticAssertDecl::~StaticAssertDecl() {
 
 CXXTempVarDecl *CXXTempVarDecl::Create(ASTContext &C, DeclContext *DC,
                                        QualType T) {
-  assert(T->isDependentType() || 
-         isa<CXXRecordDecl>(T->getAsRecordType()->getDecl()) &&
+  assert((T->isDependentType() || 
+          isa<CXXRecordDecl>(T->getAsRecordType()->getDecl())) &&
          "CXXTempVarDecl must either have a dependent type "
          "or a C++ record type!");
   return new (C) CXXTempVarDecl(DC, T);
index bab58a2f3fc9aeae93c33859a54f6fd3c0e1f96e..dc0b57372f29ede58752f963d7338f71b6a78385 100644 (file)
@@ -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);
index 7ff473f090b403904a977f0faa2cfe8df2e6aa83..da85a98a199575807f815a629cf10e507676f6fe 100644 (file)
@@ -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