Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(385)

Unified Diff: lib/Sema/SemaDeclAttr.cpp

Issue 5672057: Allow mutex expressions where the type is forward-declared, and thus not LOCKABLE.
Patch Set: Created 13 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Sema/SemaDeclAttr.cpp
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 54e7969e0d40326b8911bd0f8e196e6d9a3e8286..f0830b8861a0b1b23d786fb36efe2e511f2130b5 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -283,6 +283,9 @@ static bool checkForLockableRecord(Sema &S, Decl *D, const AttributeList &Attr,
<< 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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b