-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 3.4.0
-
None
-
f27aa09ac52e572119da6e8d86e38cb96bed2985
set QTC_LOOKUPCONTEXT_DEBUG=1
Run qtcreator -test CppTools,test_completion:direct_nested_template_type_access
It crashes.
The problem is that in ResolveExpression::visit(SimpleNameAST *ast) a temporary document is created, and when it is destroyed with its control, the template name that was stored in the binding is destroyed with it, leaving a dangling pointer.
This might affect other use-cases even when debugging is disabled, since this name is stored in ClassOrNamespace::_templateId.