Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
97d93ed3
Commit
97d93ed3
authored
Aug 11, 2010
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabled the template instantiation.
parent
f446363d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
src/libs/cplusplus/DeprecatedGenTemplateInstance.cpp
src/libs/cplusplus/DeprecatedGenTemplateInstance.cpp
+3
-6
src/shared/cplusplus/Symbol.cpp
src/shared/cplusplus/Symbol.cpp
+9
-0
src/shared/cplusplus/Symbol.h
src/shared/cplusplus/Symbol.h
+3
-0
No files found.
src/libs/cplusplus/DeprecatedGenTemplateInstance.cpp
View file @
97d93ed3
...
...
@@ -399,18 +399,16 @@ FullySpecifiedType DeprecatedGenTemplateInstance::gen(Symbol *symbol)
FullySpecifiedType
DeprecatedGenTemplateInstance
::
instantiate
(
const
Name
*
className
,
Symbol
*
candidate
,
QSharedPointer
<
Control
>
control
)
{
#warning robe: enable template instantiation
#if 0
if
(
className
)
{
if
(
const
TemplateNameId
*
templId
=
className
->
asTemplateNameId
())
{
if (
Class *klass = candidate->scope()->asClass
()) {
if
(
Template
*
templ
=
candidate
->
enclosingTemplate
())
{
DeprecatedGenTemplateInstance
::
Substitution
subst
;
for
(
unsigned
i
=
0
;
i
<
templId
->
templateArgumentCount
();
++
i
)
{
FullySpecifiedType
templArgTy
=
templId
->
templateArgumentAt
(
i
);
if (i <
klass
->templateParameterCount()) {
const Name *templArgName =
klass
->templateParameterAt(i)->name();
if
(
i
<
templ
->
templateParameterCount
())
{
const
Name
*
templArgName
=
templ
->
templateParameterAt
(
i
)
->
name
();
if
(
templArgName
&&
templArgName
->
identifier
())
{
const
Identifier
*
templArgId
=
templArgName
->
identifier
();
...
...
@@ -424,6 +422,5 @@ FullySpecifiedType DeprecatedGenTemplateInstance::instantiate(const Name *classN
}
}
}
#endif
return
candidate
->
type
();
}
src/shared/cplusplus/Symbol.cpp
View file @
97d93ed3
...
...
@@ -251,6 +251,15 @@ Namespace *Symbol::enclosingNamespace() const
return
0
;
}
Template
*
Symbol
::
enclosingTemplate
()
const
{
for
(
Scope
*
s
=
_scope
;
s
;
s
=
s
->
scope
())
{
if
(
Template
*
templ
=
s
->
asTemplate
())
return
templ
;
}
return
0
;
}
Class
*
Symbol
::
enclosingClass
()
const
{
for
(
Scope
*
s
=
_scope
;
s
;
s
=
s
->
scope
())
{
...
...
src/shared/cplusplus/Symbol.h
View file @
97d93ed3
...
...
@@ -292,6 +292,9 @@ public:
/// Returns the eclosing namespace scope.
Namespace
*
enclosingNamespace
()
const
;
/// Returns the eclosing template scope.
Template
*
enclosingTemplate
()
const
;
/// Returns the enclosing class scope.
Class
*
enclosingClass
()
const
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment