diff options
author | Topi Reinio <topi.reinio@qt.io> | 2020-06-29 13:47:08 +0200 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2020-06-30 11:22:33 +0200 |
commit | f72928e711870625a583d06b2539c7af557727b7 (patch) | |
tree | c170784a5d550469e266e91cf622c5f5c21ef593 /tests/auto/qdoc/generatedoutput/testdata | |
parent | 007e2b69d0f55d03d447e5803a2e8f03f08733ef (diff) |
qdoc: Ignore unnamed declarations when retrieving parameter names
The Clang visitor returns a CXCursor_ParmDecl also for parameter
declarations in the return type, as is the case with std::function
wrappers that take parameters. Handling these caused us to omit
some of the actual parameter names.
Skip declarations that do not provide a parameter name.
Fixes: QTBUG-67244
Change-Id: Id5d8d3302fe3580c10814735a0684b83b8d5ebb4
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'tests/auto/qdoc/generatedoutput/testdata')
-rw-r--r-- | tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp | 11 | ||||
-rw-r--r-- | tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp index 835b85336..eb5b79c67 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp +++ b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp @@ -125,6 +125,17 @@ void Test::someFunctionDefaultArg(int i, bool b = false) return; } +/*! + \fn void Test::func(bool) + \internal +*/ + +/*! + \fn [funcPtr] void (*funcPtr(bool b, const char *s))(bool) + + Returns a pointer to a function that takes a boolean. Uses \a b and \a s. +*/ + // Documented below with an \fn command. Unnecessary but we support it, and it's used. int Test::someFunction(int v) { diff --git a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h index b3dc3df2a..b950dfec9 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h +++ b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h @@ -56,6 +56,11 @@ using Specialized = Struct<int, T>; void obsoleteMember(); void anotherObsoleteMember(); void deprecatedMember(); + void func(bool) {}; + //! [funcPtr] + void (*funcPtr(bool b, const char *s))(bool) { + return func; + } inline void inlineFunction() {}; virtual void virtualFun(); |