diff options
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: |