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
Q
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
Tobias Hunger
qt-creator
Commits
51fbf969
Commit
51fbf969
authored
May 26, 2010
by
Erik Verbruggen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for the GCC "unavailable" attribute.
parent
9e89f36c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
1 deletion
+22
-1
src/shared/cplusplus/CheckSpecifier.cpp
src/shared/cplusplus/CheckSpecifier.cpp
+5
-1
src/shared/cplusplus/Control.cpp
src/shared/cplusplus/Control.cpp
+5
-0
src/shared/cplusplus/Control.h
src/shared/cplusplus/Control.h
+1
-0
src/shared/cplusplus/FullySpecifiedType.cpp
src/shared/cplusplus/FullySpecifiedType.cpp
+7
-0
src/shared/cplusplus/FullySpecifiedType.h
src/shared/cplusplus/FullySpecifiedType.h
+4
-0
No files found.
src/shared/cplusplus/CheckSpecifier.cpp
View file @
51fbf969
...
...
@@ -439,8 +439,12 @@ bool CheckSpecifier::visit(TypeofSpecifierAST *ast)
bool
CheckSpecifier
::
visit
(
AttributeAST
*
ast
)
{
if
(
ast
->
identifier_token
)
{
if
(
identifier
(
ast
->
identifier_token
)
==
control
()
->
deprecatedId
())
const
Identifier
*
id
=
identifier
(
ast
->
identifier_token
);
if
(
id
==
control
()
->
deprecatedId
())
_fullySpecifiedType
.
setDeprecated
(
true
);
else
if
(
id
==
control
()
->
unavailableId
())
_fullySpecifiedType
.
setUnavailable
(
true
);
}
return
false
;
}
src/shared/cplusplus/Control.cpp
View file @
51fbf969
...
...
@@ -516,6 +516,7 @@ public:
std
::
vector
<
Symbol
*>
symbols
;
const
Identifier
*
deprecatedId
;
const
Identifier
*
unavailableId
;
// ObjC context keywords:
const
Identifier
*
objcGetterId
;
const
Identifier
*
objcSetterId
;
...
...
@@ -532,6 +533,7 @@ Control::Control()
d
=
new
Data
(
this
);
d
->
deprecatedId
=
findOrInsertIdentifier
(
"deprecated"
);
d
->
unavailableId
=
findOrInsertIdentifier
(
"unavailable"
);
d
->
objcGetterId
=
findOrInsertIdentifier
(
"getter"
);
d
->
objcSetterId
=
findOrInsertIdentifier
(
"setter"
);
...
...
@@ -736,6 +738,9 @@ ObjCPropertyDeclaration *Control::newObjCPropertyDeclaration(unsigned sourceLoca
const
Identifier
*
Control
::
deprecatedId
()
const
{
return
d
->
deprecatedId
;
}
const
Identifier
*
Control
::
unavailableId
()
const
{
return
d
->
unavailableId
;
}
const
Identifier
*
Control
::
objcGetterId
()
const
{
return
d
->
objcGetterId
;
}
...
...
src/shared/cplusplus/Control.h
View file @
51fbf969
...
...
@@ -177,6 +177,7 @@ public:
ObjCPropertyDeclaration
*
newObjCPropertyDeclaration
(
unsigned
sourceLocation
,
const
Name
*
name
);
const
Identifier
*
deprecatedId
()
const
;
const
Identifier
*
unavailableId
()
const
;
// Objective-C specific context keywords.
const
Identifier
*
objcGetterId
()
const
;
const
Identifier
*
objcSetterId
()
const
;
...
...
src/shared/cplusplus/FullySpecifiedType.cpp
View file @
51fbf969
...
...
@@ -87,6 +87,7 @@ FullySpecifiedType FullySpecifiedType::qualifiedType() const
ty
.
setExplicit
(
false
);
ty
.
setDeprecated
(
false
);
ty
.
setUnavailable
(
false
);
return
ty
;
}
...
...
@@ -180,6 +181,12 @@ bool FullySpecifiedType::isDeprecated() const
void
FullySpecifiedType
::
setDeprecated
(
bool
isDeprecated
)
{
f
.
_isDeprecated
=
isDeprecated
;
}
bool
FullySpecifiedType
::
isUnavailable
()
const
{
return
f
.
_isUnavailable
;
}
void
FullySpecifiedType
::
setUnavailable
(
bool
isUnavailable
)
{
f
.
_isUnavailable
=
isUnavailable
;
}
bool
FullySpecifiedType
::
isEqualTo
(
const
FullySpecifiedType
&
other
)
const
{
if
(
_flags
!=
other
.
_flags
)
...
...
src/shared/cplusplus/FullySpecifiedType.h
View file @
51fbf969
...
...
@@ -113,6 +113,9 @@ public:
bool
isDeprecated
()
const
;
void
setDeprecated
(
bool
isDeprecated
);
bool
isUnavailable
()
const
;
void
setUnavailable
(
bool
isUnavailable
);
bool
isEqualTo
(
const
FullySpecifiedType
&
other
)
const
;
Type
&
operator
*
();
...
...
@@ -158,6 +161,7 @@ private:
// speficiers from attributes
unsigned
_isDeprecated
:
1
;
unsigned
_isUnavailable
:
1
;
};
union
{
unsigned
_flags
;
...
...
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