1f4a2713aSLionel Sambuc // RUN: not %clang -std=c++98 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX98 %s
2f4a2713aSLionel Sambuc // RUN: not %clang -std=gnu++98 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX98 %s
3f4a2713aSLionel Sambuc // RUN: not %clang -std=c++03 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX98 %s
4f4a2713aSLionel Sambuc // RUN: not %clang -std=c++0x %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX11 %s
5f4a2713aSLionel Sambuc // RUN: not %clang -std=gnu++0x %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX11 %s
6f4a2713aSLionel Sambuc // RUN: not %clang -std=c++11 %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX11 %s
7f4a2713aSLionel Sambuc // RUN: not %clang -std=gnu++11 %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX11 %s
8f4a2713aSLionel Sambuc // RUN: not %clang -std=c++1y %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX1Y %s
9f4a2713aSLionel Sambuc // RUN: not %clang -std=gnu++1y %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX1Y %s
10*0a6a1f1dSLionel Sambuc // RUN: not %clang -std=c++1z %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX1Z %s
11*0a6a1f1dSLionel Sambuc // RUN: not %clang -std=gnu++1z %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX1Z %s
12f4a2713aSLionel Sambuc
f(int n)13f4a2713aSLionel Sambuc void f(int n) {
14f4a2713aSLionel Sambuc typeof(n)();
15f4a2713aSLionel Sambuc decltype(n)();
16f4a2713aSLionel Sambuc }
17f4a2713aSLionel Sambuc
18f4a2713aSLionel Sambuc // CXX98: undeclared identifier 'typeof'
19f4a2713aSLionel Sambuc // CXX98: undeclared identifier 'decltype'
20f4a2713aSLionel Sambuc
21f4a2713aSLionel Sambuc // GNUXX98-NOT: undeclared identifier 'typeof'
22f4a2713aSLionel Sambuc // GNUXX98: undeclared identifier 'decltype'
23f4a2713aSLionel Sambuc
24f4a2713aSLionel Sambuc // CXX11: undeclared identifier 'typeof'
25f4a2713aSLionel Sambuc // CXX11-NOT: undeclared identifier 'decltype'
26f4a2713aSLionel Sambuc
27f4a2713aSLionel Sambuc // GNUXX11-NOT: undeclared identifier 'typeof'
28f4a2713aSLionel Sambuc // GNUXX11-NOT: undeclared identifier 'decltype'
29f4a2713aSLionel Sambuc
30f4a2713aSLionel Sambuc // CXX1Y: undeclared identifier 'typeof'
31f4a2713aSLionel Sambuc // CXX1Y-NOT: undeclared identifier 'decltype'
32f4a2713aSLionel Sambuc
33f4a2713aSLionel Sambuc // GNUXX1Y-NOT: undeclared identifier 'typeof'
34f4a2713aSLionel Sambuc // GNUXX1Y-NOT: undeclared identifier 'decltype'
35*0a6a1f1dSLionel Sambuc
36*0a6a1f1dSLionel Sambuc // CXX1Z: undeclared identifier 'typeof'
37*0a6a1f1dSLionel Sambuc // CXX1Z-NOT: undeclared identifier 'decltype'
38*0a6a1f1dSLionel Sambuc
39*0a6a1f1dSLionel Sambuc // GNUXX1Z-NOT: undeclared identifier 'typeof'
40*0a6a1f1dSLionel Sambuc // GNUXX1Z-NOT: undeclared identifier 'decltype'
41