mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Bug 519790 - ClassCastException in CPPVisitor.createAutoParameterType()
Change-Id: If200ee08b61b94af2d559505498b4dbc585c3d6e
This commit is contained in:
parent
01a45c3d00
commit
862cf70fa3
1 changed files with 9 additions and 2 deletions
|
@ -2178,8 +2178,15 @@ public class CPPVisitor extends ASTQueries {
|
|||
placeholderKind);
|
||||
}
|
||||
if (declarator.getParent() instanceof ICPPASTParameterDeclaration) {
|
||||
if (declarator.getParent().getParent() instanceof ICPPASTFunctionDeclarator) {
|
||||
// 'auto' used as the type of a function parameter.
|
||||
return createAutoParameterType(declSpec, declarator,
|
||||
(ICPPASTParameterDeclaration) declarator.getParent(), placeholderKind);
|
||||
} else {
|
||||
// 'auto' used as the type of a template parameter.
|
||||
// This is a C++17 feature we don't yet support.
|
||||
return ProblemType.CANNOT_DEDUCE_AUTO_TYPE;
|
||||
}
|
||||
}
|
||||
ICPPASTInitializerClause autoInitClause= null;
|
||||
IASTNode parent = declarator.getParent().getParent();
|
||||
|
|
Loading…
Add table
Reference in a new issue