blob: 0a991baf9d7dc3f093621afcef2cfaee6e9ca3f8 [file] [log] [blame]
Alexey Bataev0a47e652016-01-12 09:01:25 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3// This invalid declaration used to call infinite recursion in linkage
4// calculation for enum as a function argument.
5inline foo(A)(enum E;
6// expected-error@-1 {{unknown type name 'foo'}}
7// expected-error@-2 {{ISO C++ forbids forward references to 'enum' types}}
8// expected-error@-3 {{expected ')'}}
9// expected-note@-4 {{to match this '('}}