aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/CommentSema.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-08-06 16:29:26 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-08-06 16:29:26 +0000
commit88815f3f81361692dd281000e3e46bf163b2f28b (patch)
tree7387551544bd1abfbff86fee11b3773d70b79cc8 /lib/AST/CommentSema.cpp
parent427435fb15593f19f86aee0c25e2b96e03aadf69 (diff)
Comment diagnostics: \return in void function: specialize diagnostic text for
ObjC methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161324 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CommentSema.cpp')
-rw-r--r--lib/AST/CommentSema.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/AST/CommentSema.cpp b/lib/AST/CommentSema.cpp
index c8422508d3..770d5bba24 100644
--- a/lib/AST/CommentSema.cpp
+++ b/lib/AST/CommentSema.cpp
@@ -481,7 +481,10 @@ void Sema::checkReturnsCommand(const BlockCommandComment *Command) {
unsigned DiagKind;
switch (ThisDeclInfo->ThisDecl->getKind()) {
default:
- DiagKind = 0;
+ if (ThisDeclInfo->IsObjCMethod)
+ DiagKind = 3;
+ else
+ DiagKind = 0;
break;
case Decl::CXXConstructor:
DiagKind = 1;