aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-19 14:02:50 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-19 16:46:25 +0200
commit843b9c3c2ed76af346984de7be65dc1666eb49d7 (patch)
treeffe32cd13183ac60b6db61a8374701f3a1618ea2
parenta4bc4121ef3ae3a8d863618200c4787bfd4d64a9 (diff)
shiboken: Fix duplicated template parameters of functions with non-type template parameters
Clear the instantiations in case clang parsing failed Task-number: PYSIDE-1296 Change-Id: Ia1e07d633f45338fc8f35efa46c752a62a51ad76 Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r--sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
index 63de317c3..310a751e0 100644
--- a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
+++ b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
@@ -470,6 +470,8 @@ void BuilderPrivate::addTemplateInstantiations(const CXType &type,
// Finally, remove the list "<>" from the type name.
const bool parsed = addTemplateInstantiationsRecursion(type, t)
&& !t->instantiations().isEmpty();
+ if (!parsed)
+ t->setInstantiations({});
const QPair<int, int> pos = parsed
? parseTemplateArgumentList(*typeName, dummyTemplateArgumentHandler)
: t->parseTemplateArgumentList(*typeName);