On Feb 16, 2012, at 9:15 AM, DeLesley Hutchins <[email protected]> wrote:

> 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)


Do you want to use RequireCompleteType, to instantiate class templates or 
member classes of class templates if needed? 

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to