mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Bug 516685 - ClassCastException in CPPTemplates.createInstance()
Change-Id: I9b4ca25afa60a6ed3a79411cc5daa27add3e9cba
This commit is contained in:
parent
0880413e98
commit
b0cfef83db
1 changed files with 1 additions and 1 deletions
|
@ -954,7 +954,7 @@ public class CPPTemplates {
|
|||
|
||||
IValue value;
|
||||
ICPPASTDeclarator decl = ASTQueries.findAncestorWithType(point, ICPPASTDeclarator.class);
|
||||
if (((IASTName) point).getRoleOfName(false) == IASTNameOwner.r_definition
|
||||
if (point instanceof IASTName && ((IASTName) point).getRoleOfName(false) == IASTNameOwner.r_definition
|
||||
&& decl != null && decl.getInitializer() != null) {
|
||||
// Explicit specialization.
|
||||
value = SemanticUtil.getValueOfInitializer(decl.getInitializer(), type);
|
||||
|
|
Loading…
Add table
Reference in a new issue