normalizeTypeFromSignature: Update for Clang 13
Clang 13 now outputs "unnamed struct" just like GCC, while it earlier used to output "anonymous struct" (since https://reviews.llvm.org/D96807). Therefore, for Q_CC_CLANG check for both "anonymous" and "unnamed". This fixes the QMetaType testcase when built with Clang 13. Change-Id: I34de8c2ca05c0e691fbb990b001f011b0f336dc3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
39f0633f0b
commit
a126b9be89
@ -1935,10 +1935,9 @@ public:
|
|||||||
#if defined (Q_CC_CLANG)
|
#if defined (Q_CC_CLANG)
|
||||||
if (name.find("anonymous ") != std::string_view::npos)
|
if (name.find("anonymous ") != std::string_view::npos)
|
||||||
return normalizeType(begin, end);
|
return normalizeType(begin, end);
|
||||||
#else
|
#endif
|
||||||
if (name.find("unnamed ") != std::string_view::npos)
|
if (name.find("unnamed ") != std::string_view::npos)
|
||||||
return normalizeType(begin, end);
|
return normalizeType(begin, end);
|
||||||
#endif
|
|
||||||
while (begin < end) {
|
while (begin < end) {
|
||||||
if (*begin == ' ') {
|
if (*begin == ' ') {
|
||||||
if (last == ',' || last == '>' || last == '<' || last == '*' || last == '&') {
|
if (last == ',' || last == '>' || last == '<' || last == '*' || last == '&') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user