summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/CommentSema.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-05-20 23:40:39 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-05-20 23:40:39 +0000
commit04eb8abba9fbffd31dafc9f3c1c16b4212402de7 (patch)
treec69001e679ea78dcb403128a187ea77438138f96 /clang/lib/AST/CommentSema.cpp
parent0b1f476888c638af45c31bca9fbe3bc8180daa8f (diff)
downloadbcm5719-llvm-04eb8abba9fbffd31dafc9f3c1c16b4212402de7.tar.gz
bcm5719-llvm-04eb8abba9fbffd31dafc9f3c1c16b4212402de7.zip
doc. parsing. HeaderDoc documentaton allows use of
@class command on an @interface declaration. Turn off the warning for this case. // rdar://13927330 llvm-svn: 182334
Diffstat (limited to 'clang/lib/AST/CommentSema.cpp')
-rw-r--r--clang/lib/AST/CommentSema.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/CommentSema.cpp b/clang/lib/AST/CommentSema.cpp
index e0138d5f3f2..c242eb0f606 100644
--- a/clang/lib/AST/CommentSema.cpp
+++ b/clang/lib/AST/CommentSema.cpp
@@ -132,6 +132,11 @@ void Sema::checkContainerDeclVerbatimLine(const BlockCommandComment *Comment) {
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;
OpenPOWER on IntegriCloud