summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckDeclarator.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-11-10 16:00:22 +0100
committerRoberto Raggi <roberto.raggi@nokia.com>2009-11-10 16:20:13 +0100
commitcdb144321926d1c43242deeaffa0fb8e55873014 (patch)
treecda282ed4498efe2aaa9e83a294aa33ec5973cf8 /src/shared/cplusplus/CheckDeclarator.cpp
parent4fc2ccf0c5af6d93b1edca95518043b84e342c67 (diff)
downloadqt-creator-cdb144321926d1c43242deeaffa0fb8e55873014.tar.gz
Cleanup specifiers.
Diffstat (limited to 'src/shared/cplusplus/CheckDeclarator.cpp')
-rw-r--r--src/shared/cplusplus/CheckDeclarator.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/shared/cplusplus/CheckDeclarator.cpp b/src/shared/cplusplus/CheckDeclarator.cpp
index 0874c1bfa1..d51aaebd52 100644
--- a/src/shared/cplusplus/CheckDeclarator.cpp
+++ b/src/shared/cplusplus/CheckDeclarator.cpp
@@ -196,9 +196,9 @@ bool CheckDeclarator::visit(FunctionDeclaratorAST *ast)
FullySpecifiedType funTy(fun);
_fullySpecifiedType = funTy;
- for (SpecifierAST *it = ast->cv_qualifier_seq; it; it = it->next) {
- SimpleSpecifierAST *cv = static_cast<SimpleSpecifierAST *>(it);
- int k = tokenKind(cv->specifier_token);
+ for (SpecifierListAST *it = ast->cv_qualifier_seq; it; it = it->next) {
+ SimpleSpecifierAST *cv = static_cast<SimpleSpecifierAST *>(it->value);
+ const int k = tokenKind(cv->specifier_token);
if (k == T_CONST)
fun->setConst(true);
else if (k == T_VOLATILE)
@@ -278,9 +278,10 @@ bool CheckDeclarator::visit(ObjCMethodPrototypeAST *ast)
return false;
}
-void CheckDeclarator::applyCvQualifiers(SpecifierAST *cv)
+void CheckDeclarator::applyCvQualifiers(SpecifierListAST *it)
{
- for (; cv; cv = cv->next) {
+ for (; it; it = it->next) {
+ SpecifierAST *cv = it->value;
SimpleSpecifierAST *spec = static_cast<SimpleSpecifierAST *>(cv);
switch (translationUnit()->tokenKind(spec->specifier_token)) {
case T_VOLATILE: