r182334 - doc. parsing. HeaderDoc documentaton allows use of
Fariborz Jahanian
fjahanian at apple.com
Mon May 20 16:40:39 PDT 2013
Author: fjahanian
Date: Mon May 20 18:40:39 2013
New Revision: 182334
URL: http://llvm.org/viewvc/llvm-project?rev=182334&view=rev
Log:
doc. parsing. HeaderDoc documentaton allows use of
@class command on an @interface declaration. Turn off
the warning for this case. // rdar://13927330
Modified:
cfe/trunk/lib/AST/CommentSema.cpp
cfe/trunk/test/Sema/warn-documentation.m
Modified: cfe/trunk/lib/AST/CommentSema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentSema.cpp?rev=182334&r1=182333&r2=182334&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CommentSema.cpp (original)
+++ cfe/trunk/lib/AST/CommentSema.cpp Mon May 20 18:40:39 2013
@@ -132,6 +132,11 @@ void Sema::checkContainerDeclVerbatimLin
switch (Comment->getCommandID()) {
case CommandTraits::KCI_class:
DiagSelect = !isClassOrStructDecl() ? 1 : 0;
+ // Allow @class command on @interface declarations.
+ // FIXME. Currently, \class and @class are indistinguishable. So,
+ // \class is also allowed on an @interface declaration
+ if (DiagSelect && Comment->getCommandMarker() && isObjCInterfaceDecl())
+ DiagSelect = 0;
break;
case CommandTraits::KCI_interface:
DiagSelect = !isObjCInterfaceDecl() ? 2 : 0;
Modified: cfe/trunk/test/Sema/warn-documentation.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/warn-documentation.m?rev=182334&r1=182333&r2=182334&view=diff
==============================================================================
--- cfe/trunk/test/Sema/warn-documentation.m (original)
+++ cfe/trunk/test/Sema/warn-documentation.m Mon May 20 18:40:39 2013
@@ -197,3 +197,9 @@ int FooBar();
{
}
@end
+
+// rdar://13927330
+/// @class Asset <- '@class' may be used in a comment attached to a an interface declaration
+ at interface Asset : NSObject
+ at end
+
More information about the cfe-commits
mailing list