mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Bug 548954 - Type transformation specifier in type-id
Change-Id: Ia8e0aaf7814cb104d296ae20cc5f43fd2ddd0792
This commit is contained in:
parent
e09163e75a
commit
96bbd4b7a8
2 changed files with 12 additions and 0 deletions
|
@ -11348,6 +11348,17 @@ public class AST2CPPTests extends AST2CPPTestBase {
|
||||||
assertSameType((ITypedef) helper.assertNonProblem("loong_type"), CPPBasicType.LONG);
|
assertSameType((ITypedef) helper.assertNonProblem("loong_type"), CPPBasicType.LONG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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>
|
// template <typename T>
|
||||||
// struct underlying_type {
|
// struct underlying_type {
|
||||||
// typedef __underlying_type(T) type;
|
// typedef __underlying_type(T) type;
|
||||||
|
|
|
@ -2780,6 +2780,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
||||||
// gcc-special
|
// gcc-special
|
||||||
case IGCCToken.t_typeof:
|
case IGCCToken.t_typeof:
|
||||||
case IGCCToken.t__attribute__:
|
case IGCCToken.t__attribute__:
|
||||||
|
case IGCCToken.tTT_underlying_type:
|
||||||
|
|
||||||
// content assist
|
// content assist
|
||||||
case IToken.tCOMPLETION:
|
case IToken.tCOMPLETION:
|
||||||
|
|
Loading…
Add table
Reference in a new issue