@class command on an @interface declaration. Turn off
the warning for this case. // rdar://
13927330
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182334
91177308-0d34-0410-b5e6-
96231b3b80d8
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;
{
}
@end
+
+// rdar://13927330
+/// @class Asset <- '@class' may be used in a comment attached to a an interface declaration
+@interface Asset : NSObject
+@end
+