Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorNathan Ridge2019-07-03 23:02:06 -0400
committerNathan Ridge2019-07-03 23:02:35 -0400
commit96bbd4b7a8859cde8afab507c9ca820011fab82b (patch)
tree3a016e0b2f294349c8ac54f80f203752b21e68ef /core
parente09163e75add60004d856b242f1a297cbc8077ea (diff)
downloadorg.eclipse.cdt-96bbd4b7a8859cde8afab507c9ca820011fab82b.tar.gz
org.eclipse.cdt-96bbd4b7a8859cde8afab507c9ca820011fab82b.tar.xz
org.eclipse.cdt-96bbd4b7a8859cde8afab507c9ca820011fab82b.zip
Bug 548954 - Type transformation specifier in type-id
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java11
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java1
2 files changed, 12 insertions, 0 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 eae38c57ac..f38ec70b8b 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
@@ -11350,6 +11350,17 @@ public class AST2CPPTests extends AST2CPPTestBase {
// template <typename T>
// struct underlying_type {
+ // using type = __underlying_type(T);
+ // };
+ // enum class E : short {};
+ // using target = underlying_type<E>::type;
+ public void testUnderlyingType_548954() throws Exception {
+ BindingAssertionHelper helper = getAssertionHelper();
+ assertSameType((ITypedef) helper.assertNonProblem("target"), CPPBasicType.SHORT);
+ }
+
+ // template <typename T>
+ // struct underlying_type {
// typedef __underlying_type(T) type;
// };
//
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java
index 7b9d8ba756..f5aaab6410 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java
@@ -2780,6 +2780,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
// gcc-special
case IGCCToken.t_typeof:
case IGCCToken.t__attribute__:
+ case IGCCToken.tTT_underlying_type:
// content assist
case IToken.tCOMPLETION:

Back to the top