diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-05-20 23:40:39 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-05-20 23:40:39 +0000 |
commit | 04eb8abba9fbffd31dafc9f3c1c16b4212402de7 (patch) | |
tree | c69001e679ea78dcb403128a187ea77438138f96 /clang/lib/AST/CommentSema.cpp | |
parent | 0b1f476888c638af45c31bca9fbe3bc8180daa8f (diff) | |
download | bcm5719-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.cpp | 5 |
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; |