mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 09:56:33 +00:00

No other compiler accepts this as an extension, not even in permissive mode. We're not doing anyone any favors by allowing this, and it's unlikely to be at all common, even in Clang-only code, in the wild.
11 lines
362 B
C++
11 lines
362 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
template<typename T> typedef T X; // expected-error{{typedef cannot be a template}}
|
|
|
|
template<typename T>
|
|
enum t0 { A = T::x }; // expected-error{{enumeration cannot be a template}} \
|
|
// expected-error{{declaration does not declare anything}}
|
|
|
|
enum e0 {};
|
|
template<int x> enum e0 f0(int a=x) {}
|