def warn_doc_returns_not_attached_to_a_function_decl : Warning<
"'\\%0' command used in a comment that is not attached to "
- "a function declaration">,
+ "a function or method declaration">,
InGroup<Documentation>, DefaultIgnore;
def warn_doc_returns_attached_to_a_void_function : Warning<
"'\\%0' command used in a comment that is attached to a "
- "%select{void function|constructor|destructor}1">,
+ "%select{function returning void|constructor|destructor|"
+ "method returning void}1">,
InGroup<Documentation>, DefaultIgnore;
} // end of documentation issue category
IsTemplateDecl = false;
IsTemplateSpecialization = false;
IsTemplatePartialSpecialization = false;
+ IsObjCMethod = false;
IsInstanceMethod = false;
IsClassMethod = false;
ParamVars = ArrayRef<const ParmVarDecl *>();
ParamVars = ArrayRef<const ParmVarDecl *>(MD->param_begin(),
MD->param_size());
ResultType = MD->getResultType();
+ IsObjCMethod = true;
IsInstanceMethod = MD->isInstanceMethod();
IsClassMethod = !IsInstanceMethod;
break;
template<typename T>
T test_returns_right_decl_5(T aaa);
-// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function declaration}}
+// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
/// \returns Aaa
int test_returns_wrong_decl_1;
-// expected-warning@+1 {{'\return' command used in a comment that is not attached to a function declaration}}
+// expected-warning@+1 {{'\return' command used in a comment that is not attached to a function or method declaration}}
/// \return Aaa
int test_returns_wrong_decl_2;
-// expected-warning@+1 {{'\result' command used in a comment that is not attached to a function declaration}}
+// expected-warning@+1 {{'\result' command used in a comment that is not attached to a function or method declaration}}
/// \result Aaa
int test_returns_wrong_decl_3;
-// expected-warning@+1 {{'\returns' command used in a comment that is attached to a void function}}
+// expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}}
/// \returns Aaa
void test_returns_wrong_decl_4(int);
-// expected-warning@+1 {{'\returns' command used in a comment that is attached to a void function}}
+// expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}}
/// \returns Aaa
template<typename T>
void test_returns_wrong_decl_5(T aaa);
-// expected-warning@+1 {{'\returns' command used in a comment that is attached to a void function}}
+// expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}}
/// \returns Aaa
template<>
void test_returns_wrong_decl_5(int aaa);
-// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function declaration}}
+// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
/// \returns Aaa
struct test_returns_wrong_decl_6 { };
-// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function declaration}}
+// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
/// \returns Aaa
class test_returns_wrong_decl_7 {
// expected-warning@+1 {{'\returns' command used in a comment that is attached to a constructor}}
~test_returns_wrong_decl_7();
};
-// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function declaration}}
+// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
/// \returns Aaa
enum test_returns_wrong_decl_8 {
- // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function declaration}}
+ // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
/// \returns Aaa
test_returns_wrong_decl_9
};
-// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function declaration}}
+// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
/// \returns Aaa
namespace test_returns_wrong_decl_10 { };