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......)>
26
26
using i=int ;
27
27
template <typename T> using x=V<T>;
28
28
29
+ #ifdef __GNUC__
30
+ using type __attribute__ ((__nodebug__)) = int;
31
+ #endif
32
+
29
33
template <typename T>
30
34
class C
31
35
{
Original file line number Diff line number Diff line change @@ -583,7 +583,23 @@ bool Parser::rDefinition(cpp_itemt &item)
583
583
else if (t==TOK_INLINE && lex.LookAhead (1 )==TOK_NAMESPACE)
584
584
return rNamespaceSpec (item.make_namespace_spec ());
585
585
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
+ }
587
603
else if (t==TOK_STATIC_ASSERT)
588
604
return rStaticAssert (item.make_static_assert ());
589
605
else
You can’t perform that action at this time.
0 commit comments