Commit Graph

7 Commits

Author SHA1 Message Date
Orgad Shaneh
a77e32800c C++: Ignore explicit template instantiations
Defined in section 14.7.2 of the standard.

Fixes completion for std::string.

The following explicit instantiation appears in bits/basic_string.tcc:
  extern template class basic_string<char>;

This is wrongfully considered a specialization for a forward declaration
(like `template<> class basic_string<char>` is).

Introduce a new Symbol type for explicit instantiations.

Use-case:
template<class T>
struct Foo { T bar; };

template class Foo<int>;

void func()
{
    Foo<int> foo;
    foo.bar; // bar not highlighted
}

Change-Id: I9e35c8c32f6b78fc87b4f4f1fc903b42cfbd2c2b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-29 09:22:08 +00:00
Nikolai Kosjar
f7e26babba C++: Fix names of functions dealing with enclosing scopes
...in order to better tell apart the type related functions
isScope()/asScope() and the functions dealing with enclosing scopes:

    * scope() --> enclosingScope()
    * setScope() --> setEnclosingScope()
    * resetScope() --> resetEnclosingScope()

Change-Id: Id743a7d1b6a1a1a0ffcd8568cbd8ebbdfc16eaa1
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-07-16 08:26:19 +02:00
Przemyslaw Gorszkowski
17cd161a9d C++: fix cloning of templates
Fix instantiation of templates(by cloning original symbols). Assigning of scope
for cloned symbol is taken from the symbol which is used to instantiate.

Task-number: QTCREATORBUG-9098
Change-Id: I066cc8b5f69333fabdaf2d4466b205baf08bd3f1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-04-17 14:10:32 +02:00
Christian Kamm
e4a7b0642b C++: Fix a crash in debug builds when rewriting functions.
Change-Id: I35266b69d1cc433c4d9176cc849efd03ea1cc1cd
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-10-25 11:32:18 +02:00
Roberto Raggi
9608af7ad2 Added support to C++ symbols rewriting.
This should simplify full C++ template instantiations.

Reviewed-by: Christian Kamm
2011-05-17 11:45:47 +02:00
Oswald Buddenhagen
b342ad8cf4 remove nokia copyrights from roberto's code
they are lying. nokia has no copyright on this code. and the double
license in a single file looks weird. that's why we moved it to
3rdparty/, so it is clear it is not nokia's.

Approved-by: legal
2011-05-16 11:05:30 +02:00
Oswald Buddenhagen
67704b8b41 move src/shared/cplusplus/ -> src/libs/3rdparty/cplusplus/
Approved-by: legal
2011-05-16 11:05:30 +02:00