[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-bugs
Subject: [Bug 269352] endless loop in CppClassType::toString with template
From: Bart Janssens <bart.janssens () lid ! kviv ! be>
Date: 2011-06-20 22:07:58
Message-ID: 20110620220758.736D58AAD7 () immanuel ! kde ! org
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=269352
--- Comment #9 from Bart Janssens <bart janssens lid kviv be> 2011-06-21 00:07:56 \
--- Just made some crude changes (without understanding what's going on) but it
breaks out of the loop. In particular, I don't know what the commented out
lines did, and what breaks by removing them. The diffs for kdevelop and
kdevplatform:
diff --git a/languages/cpp/cppduchain/cpptypes.cpp
b/languages/cpp/cppduchain/cpptypes.cpp
index 04c880d..7485671 100644
--- a/languages/cpp/cppduchain/cpptypes.cpp
+++ b/languages/cpp/cppduchain/cpptypes.cpp
@@ -51,8 +51,9 @@ QString CppClassType::toString() const
{
QualifiedIdentifier id = qualifiedIdentifier();
if (!id.isEmpty()) {
- if(declarationId().specialization().index())
- return AbstractType::toString() +
Cpp::IndexedInstantiationInformation(declarationId().specialization()).information().applyToIdentifier(id).toString();
+ const QualifiedIdentifier other_id =
Cpp::IndexedInstantiationInformation(declarationId().specialization()).information().applyToIdentifier(id);
+ if(declarationId().specialization().index() && other_id != id)
+ return AbstractType::toString() + other_id.toString();
else
return AbstractType::toString() + id.toString();
}
diff --git a/language/duchain/instantiationinformation.cpp
b/language/duchain/instantiationinformation.cpp
index dbc236d..da89b40 100644
--- a/language/duchain/instantiationinformation.cpp
+++ b/language/duchain/instantiationinformation.cpp
@@ -46,11 +46,11 @@ QualifiedIdentifier
InstantiationInformation::applyToIdentifier(const QualifiedI
lastId.clearTemplateIdentifiers();
for(uint a = 0; a < templateParametersSize(); ++a) {
- if(templateParameters()[a].abstractType()) {
-
lastId.appendTemplateIdentifier(IndexedTypeIdentifier(templateParameters()[a].abstractType()->toString(),
true));
- }else{
+// if(templateParameters()[a].abstractType()) {
+//
lastId.appendTemplateIdentifier(IndexedTypeIdentifier(templateParameters()[a].abstractType()->toString(),
true));
+// }else{
lastId.appendTemplateIdentifier((uint) oldTemplateIdentifiers.size() > a
? oldTemplateIdentifiers[a] : IndexedTypeIdentifier());
- }
+// }
}
for(int a = templateParametersSize(); a < oldTemplateIdentifiers.size();
++a)
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic