[cfe-commits] r134938 - /cfe/trunk/lib/Sema/SemaDeclAttr.cpp

Chandler Carruth chandlerc at gmail.com
Mon Jul 11 16:33:05 PDT 2011


Author: chandlerc
Date: Mon Jul 11 18:33:05 2011
New Revision: 134938

URL: http://llvm.org/viewvc/llvm-project?rev=134938&view=rev
Log:
Style tweak to the more idiomatic 'assert(!bad_state())'.

Patch by Caitlin Sadowski.

Modified:
    cfe/trunk/lib/Sema/SemaDeclAttr.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=134938&r1=134937&r2=134938&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Mon Jul 11 18:33:05 2011
@@ -812,7 +812,7 @@
 }
 
 static void handleNoCommonAttr(Sema &S, Decl *D, const AttributeList &Attr) {
-  assert(Attr.isInvalid() == false);
+  assert(!Attr.isInvalid());
   if (isa<VarDecl>(D))
     D->addAttr(::new (S.Context) NoCommonAttr(Attr.getLoc(), S.Context));
   else
@@ -821,7 +821,7 @@
 }
 
 static void handleCommonAttr(Sema &S, Decl *D, const AttributeList &Attr) {
-  assert(Attr.isInvalid() == false);
+  assert(!Attr.isInvalid());
   if (isa<VarDecl>(D))
     D->addAttr(::new (S.Context) CommonAttr(Attr.getLoc(), S.Context));
   else
@@ -2492,7 +2492,7 @@
 }
 
 static void handleOpenCLKernelAttr(Sema &S, Decl *D, const AttributeList &Attr){
-  assert(Attr.isInvalid() == false);
+  assert(!Attr.isInvalid());
   D->addAttr(::new (S.Context) OpenCLKernelAttr(Attr.getLoc(), S.Context));
 }
 





More information about the cfe-commits mailing list