blob: 99deb11365eb91663e647994f9e030ffd9635957 [file] [log] [blame]
Richard Smith0b1b5b82011-10-13 21:32:47 +00001// RUN: %clang -std=c++98 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX98 %s
2// RUN: %clang -std=gnu++98 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX98 %s
3// RUN: %clang -std=c++0x %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX11 %s
4// RUN: %clang -std=gnu++0x %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX11 %s
5// RUN: %clang -std=c++11 %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX11 %s
6// RUN: %clang -std=gnu++11 %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX11 %s
7
8void f(int n) {
9 typeof(n)();
10 decltype(n)();
11}
12
13// CXX98: undeclared identifier 'typeof'
14// CXX98: undeclared identifier 'decltype'
15
16// GNUXX98-NOT: undeclared identifier 'typeof'
17// GNUXX98: undeclared identifier 'decltype'
18
19// CXX11: undeclared identifier 'typeof'
20// CXX11-NOT: undeclared identifier 'decltype'
21
22// GNUXX11-NOT: undeclared identifier 'typeof'
23// GNUXX11-NOT: undeclared identifier 'decltype'