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

DeLesley Hutchins delesley at google.com
Thu Feb 16 09:15:51 PST 2012


Author: delesley
Date: Thu Feb 16 11:15:51 2012
New Revision: 150702

URL: http://llvm.org/viewvc/llvm-project?rev=150702&view=rev
Log:
Thread safety analysis: Don't check for lockable on undefined types.

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=150702&r1=150701&r2=150702&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Thu Feb 16 11:15:51 2012
@@ -283,6 +283,9 @@
       << Attr.getName();
     return false;
   }
+  // Don't check for lockable if the class hasn't been defined yet. 
+  if (RT->isIncompleteType())
+    return true;
   // Flag error if the type is not lockable.
   if (!RT->getDecl()->getAttr<LockableAttr>()) {
     S.Diag(Attr.getLoc(), diag::err_attribute_argument_not_lockable)





More information about the cfe-commits mailing list