Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
Qt Creator 4.0.0-rc1, Qt Creator 4.0.0
-
None
-
Kubuntu
Description
Here is example of code
#include <utility> // for std::move template <class, class> class TNode; template <class, class> class TMetaNode; template <class UD, class Tie> class TTraits { public: using TTie = Tie; using TNodeType = TNode<UD, TTie>; using TMetaNodeType = TMetaNode<UD, TTie>; }; // ---------------------------------------------------------------------------------------------------- template <class T, class SomeTie> class TMetaNode { public: typedef TTraits<T, SomeTie> TTraitsType; void SetBranchAccessSettings(int &&BranchSettings) {} }; // ---------------------------------------------------------------------------------------------------- template <class T, class SomeTie> bool AllCopiesHaveTheSameStatus() { typedef TMetaNode<T, SomeTie> TMetaNodeType; } // ---------------------------------------------------------------------------------------------------- template <class UD, class SomeTie> class TNode { public: using TTraitsType = TTraits<UD, SomeTie>; void SetBranchAccessSettings(int &&BranchSettings) noexcept; typename TTraitsType::TMetaNodeType *d; }; template <class UD, class SomeTie> void TNode<UD, SomeTie>::SetBranchAccessSettings(int &&BranchSettings) noexcept { d->SetBranchAccessSettings(std::move(BranchSettings)); }
Now, press F2 at SetBranchAccessSettings in this line:
d->SetBranchAccessSettings(std::move(BranchSettings));
According to gdb, QtCreator hangs in while loop in LookupContext.cpp
if (fun->name() && fun->name()->isQualifiedNameId()) { if (ClassOrNamespace *binding = bindings()->lookupType(fun)) { candidates = binding->find(name); // try find this name in parent class while (candidates.isEmpty() && (binding = binding->parent())) candidates = binding->find(name); if (! candidates.isEmpty()) return candidates; } }
Attachments
For Gerrit Dashboard: QTCREATORBUG-16146 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
157236,2 | C++: Guard against parent binding loop | 4.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |