Home | History | Annotate | Download | only in Driver
      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 
     11 void f(int n) {
     12   typeof(n)();
     13   decltype(n)();
     14 }
     15 
     16 // CXX98: undeclared identifier 'typeof'
     17 // CXX98: undeclared identifier 'decltype'
     18 
     19 // GNUXX98-NOT: undeclared identifier 'typeof'
     20 // GNUXX98: undeclared identifier 'decltype'
     21 
     22 // CXX11: undeclared identifier 'typeof'
     23 // CXX11-NOT: undeclared identifier 'decltype'
     24 
     25 // GNUXX11-NOT: undeclared identifier 'typeof'
     26 // GNUXX11-NOT: undeclared identifier 'decltype'
     27 
     28 // CXX1Y: undeclared identifier 'typeof'
     29 // CXX1Y-NOT: undeclared identifier 'decltype'
     30 
     31 // GNUXX1Y-NOT: undeclared identifier 'typeof'
     32 // GNUXX1Y-NOT: undeclared identifier 'decltype'
     33