File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
regression/cpp/type_traits_essentials1 Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ struct G<T(A......)>
2626using i=int ;
2727template <typename T> using x=V<T>;
2828
29+ #ifdef __GNUC__
30+ using type __attribute__ ((__nodebug__)) = int;
31+ #endif
32+
2933template <typename T>
3034class C
3135{
Original file line number Diff line number Diff line change @@ -583,7 +583,23 @@ bool Parser::rDefinition(cpp_itemt &item)
583583 else if (t==TOK_INLINE && lex.LookAhead (1 )==TOK_NAMESPACE)
584584 return rNamespaceSpec (item.make_namespace_spec ());
585585 else if (t==TOK_USING)
586- return rUsingOrTypedef (item);
586+ {
587+ cpp_token_buffert::post pos = lex.Save ();
588+
589+ cpp_tokent tk;
590+ lex.get_token (tk);
591+ typet discard;
592+ if (
593+ is_identifier (lex.get_token (tk)) && optAttribute (discard) &&
594+ lex.LookAhead (0 ) == ' =' )
595+ {
596+ lex.Restore (pos);
597+ return rTypedefUsing (item.make_declaration ());
598+ }
599+
600+ lex.Restore (pos);
601+ return rUsing (item.make_using ());
602+ }
587603 else if (t==TOK_STATIC_ASSERT)
588604 return rStaticAssert (item.make_static_assert ());
589605 else
You can’t perform that action at this time.
0 commit comments