[cfe-commits] r168515 - /cfe/trunk/lib/AST/DeclBase.cpp

Rafael Espindola rafael.espindola at gmail.com
Fri Nov 23 06:29:54 PST 2012


Author: rafael
Date: Fri Nov 23 08:29:54 2012
New Revision: 168515

URL: http://llvm.org/viewvc/llvm-project?rev=168515&view=rev
Log:
Remove redundant check.

Modified:
    cfe/trunk/lib/AST/DeclBase.cpp

Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=168515&r1=168514&r2=168515&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Fri Nov 23 08:29:54 2012
@@ -261,9 +261,10 @@
   if (CheckUsedAttr && hasAttr<UsedAttr>())
     return true;
   
-  // Check redeclarations for used attribute.
+  // Check redeclarations. We merge attributes, so we don't need to check
+  // attributes in all redeclarations.
   for (redecl_iterator I = redecls_begin(), E = redecls_end(); I != E; ++I) {
-    if ((CheckUsedAttr && I->hasAttr<UsedAttr>()) || I->Used)
+    if (I->Used)
       return true;
   }
   





More information about the cfe-commits mailing list