that we consider a function for the purposes of checking \param and \returns,
look through reference types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197530
91177308-0d34-0410-b5e6-
96231b3b80d8
TL = PointerTL.getPointeeLoc().getUnqualifiedLoc();
continue;
}
+ // Look through reference types.
+ if (ReferenceTypeLoc ReferenceTL = TL.getAs<ReferenceTypeLoc>()) {
+ TL = ReferenceTL.getPointeeLoc().getUnqualifiedLoc();
+ continue;
+ }
// Look through adjusted types.
if (AdjustedTypeLoc ATL = TL.getAs<AdjustedTypeLoc>()) {
TL = ATL.getOriginalLoc();
/// \returns aaa.
typedef foo::function_wrapper<int (int aaa, int ccc)> *test_function_like_typedef6;
+// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
+/// \param aaa Meow.
+/// \param bbb Bbb.
+/// \returns aaa.
+typedef foo::function_wrapper<int (int aaa, int ccc)> &test_function_like_typedef7;
+
+// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
+/// \param aaa Meow.
+/// \param bbb Bbb.
+/// \returns aaa.
+typedef foo::function_wrapper<int (int aaa, int ccc)> &&test_function_like_typedef8;
+
typedef int (*test_not_function_like_typedef1)(int aaa);