Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AggregateInitialization.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
index f89cfcd547..94c9023c58 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
@@ -13062,8 +13062,9 @@ public class AST2CPPTests extends AST2CPPTestBase {
bh.assertImplicitName("b{v};", 1, IProblemBinding.class);
}
+ // using my_char = char;
// struct type {
- // char data[2];
+ // my_char data[2];
// };
//
// type foo{"s"};
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AggregateInitialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AggregateInitialization.java
index fb1190eb5d..9397d19ee4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AggregateInitialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AggregateInitialization.java
@@ -215,7 +215,8 @@ class AggregateInitialization {
*/
private static ICPPBasicType getBasicTypeFromArray(IType type) {
if (type instanceof IArrayType) {
- IType nested = SemanticUtil.getNestedType(((IArrayType) type).getType(), SemanticUtil.ALLCVQ);
+ IType nested = SemanticUtil.getNestedType(((IArrayType) type).getType(),
+ SemanticUtil.ALLCVQ | SemanticUtil.TDEF);
if (nested instanceof ICPPBasicType) {
return (ICPPBasicType) nested;
}

Back to the top