summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatype.h
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2021-09-08 13:52:10 +0300
committerMartin Storsjö <martin@martin.st>2021-09-09 08:54:42 +0300
commita126b9be890be123a46e834bfe6743d72dee935d (patch)
tree13f8db9c0dfe96b9a23690d8c0ce47621ee218c7 /src/corelib/kernel/qmetatype.h
parent39f0633f0b00444443e43599aab219a56f6cae2d (diff)
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>
Diffstat (limited to 'src/corelib/kernel/qmetatype.h')
-rw-r--r--src/corelib/kernel/qmetatype.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 6611e34c33..9d4d7d3c88 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -1935,10 +1935,9 @@ public:
#if defined (Q_CC_CLANG)
if (name.find("anonymous ") != std::string_view::npos)
return normalizeType(begin, end);
-#else
+#endif
if (name.find("unnamed ") != std::string_view::npos)
return normalizeType(begin, end);
-#endif
while (begin < end) {
if (*begin == ' ') {
if (last == ',' || last == '>' || last == '<' || last == '*' || last == '&') {