rjmccall added a comment.

Hmm.  I think this is a reasonable change to make to the language.  Have you 
investigated to see if this causes source-compatibility problems?



================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:849
+def err_atprotocol_protocol : Error<
+  "@protocol is using a forward protocol declaration of %0">;
 def warn_readonly_property : Warning<
----------------
I think that's the only warning in `-Wat-protocol`; we can at least anonymize 
it and leave a comment saying it's now empty.


================
Comment at: lib/Sema/SemaExprObjC.cpp:1235
+  } else
     PDecl = PDecl->getDefinition();
 
----------------
Please brace the second clause here.  I think even the people who don't 
generally use braces still advise being consistent within a single if-else 
chain.


================
Comment at: test/CodeGenObjC/forward-declare-protocol-gnu.m:6
 
-Protocol *getProtocol(void)
-{
-               return @protocol(P);
-}
+@interface I <P>
+@end
----------------
Does this really not require a definition of `P`?  Ugh.  I wonder if that's 
reasonable to fix, too.


================
Comment at: test/Parser/objc-cxx-keyword-identifiers.mm:22
+@protocol P2;
+@protocol delete // expected-error {{expected identifier; 'delete' is a 
keyword in Objective-C++}}
+@end
----------------
Why did this test need to change?


Repository:
  rC Clang

https://reviews.llvm.org/D49462



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to