From cdb144321926d1c43242deeaffa0fb8e55873014 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Tue, 10 Nov 2009 16:00:22 +0100 Subject: Cleanup specifiers. --- src/shared/cplusplus/CheckDeclarator.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/shared/cplusplus/CheckDeclarator.cpp') 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(it); - int k = tokenKind(cv->specifier_token); + for (SpecifierListAST *it = ast->cv_qualifier_seq; it; it = it->next) { + SimpleSpecifierAST *cv = static_cast(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(cv); switch (translationUnit()->tokenKind(spec->specifier_token)) { case T_VOLATILE: -- cgit v1.2.1