C++: fix code completion for decltyped type

example:
struct Foo { int bar; };
Foo foo() { return Foo; }
typedef decltype(foo()) TypedefedFooWithDecltype;
void fun()
{
  decltype(foo()) decltypeFoo;
  decltypeFoo.;// code completion should work here

  TypedefedFooWithDecltype typedefedFooWithDecltype;
  typedefedFooWithDecltype.;// code completion should work here
}

Started-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Task-number: QTCREATORBUG-14483
Change-Id: I296ceed9d896c68cf0651265afb08a1fc42f9a68
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-05-18 23:19:32 +03:00
committed by Orgad Shaneh
parent 57e3714db4
commit de68ac5407
8 changed files with 158 additions and 74 deletions

View File

@@ -41,6 +41,7 @@
#include <cplusplus/Control.h>
#include <cplusplus/Name.h>
#include <QEnableSharedFromThis>
#include <QSet>
#include <QMap>
@@ -99,7 +100,9 @@ private:
friend class CreateBindings;
};
class CPLUSPLUS_EXPORT CreateBindings: protected SymbolVisitor
class CPLUSPLUS_EXPORT CreateBindings
: protected SymbolVisitor
, public QEnableSharedFromThis<CreateBindings>
{
Q_DISABLE_COPY(CreateBindings)
@@ -119,6 +122,9 @@ public:
QSharedPointer<Control> control() const
{ return _control; }
Snapshot &snapshot()
{ return _snapshot; }
/// Adds an expression document in order to keep their symbols and names alive
void addExpressionDocument(Document::Ptr document)
{ _expressionDocuments.append(document); }