diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-10 16:00:22 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-10 16:20:13 +0100 |
commit | cdb144321926d1c43242deeaffa0fb8e55873014 (patch) | |
tree | cda282ed4498efe2aaa9e83a294aa33ec5973cf8 /src/shared/cplusplus/CheckDeclarator.cpp | |
parent | 4fc2ccf0c5af6d93b1edca95518043b84e342c67 (diff) | |
download | qt-creator-cdb144321926d1c43242deeaffa0fb8e55873014.tar.gz |
Cleanup specifiers.
Diffstat (limited to 'src/shared/cplusplus/CheckDeclarator.cpp')
-rw-r--r-- | src/shared/cplusplus/CheckDeclarator.cpp | 11 |
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: |