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 13 void f(int n) { 14 typeof(n)(); 15 decltype(n)(); 16 } 17 18 // CXX98: undeclared identifier 'typeof' 19 // CXX98: undeclared identifier 'decltype' 20 21 // GNUXX98-NOT: undeclared identifier 'typeof' 22 // GNUXX98: undeclared identifier 'decltype' 23 24 // CXX11: undeclared identifier 'typeof' 25 // CXX11-NOT: undeclared identifier 'decltype' 26 27 // GNUXX11-NOT: undeclared identifier 'typeof' 28 // GNUXX11-NOT: undeclared identifier 'decltype' 29 30 // CXX1Y: undeclared identifier 'typeof' 31 // CXX1Y-NOT: undeclared identifier 'decltype' 32 33 // GNUXX1Y-NOT: undeclared identifier 'typeof' 34 // GNUXX1Y-NOT: undeclared identifier 'decltype' 35 36 // CXX1Z: undeclared identifier 'typeof' 37 // CXX1Z-NOT: undeclared identifier 'decltype' 38 39 // GNUXX1Z-NOT: undeclared identifier 'typeof' 40 // GNUXX1Z-NOT: undeclared identifier 'decltype' 41