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