diff options
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 74d22e7efe..e60cd63369 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -1746,6 +1746,10 @@ static void handleObjCNSObject(Sema &S, Decl *D, const AttributeList &Attr) { return; } } + else { + S.Diag(D->getLocation(), diag::warn_nsobject_attribute); + return; + } D->addAttr(::new (S.Context) ObjCNSObjectAttr(Attr.getRange(), S.Context)); } |