Home | History | Annotate | Download | only in Driver
      1 // 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++03 %s -Wno-c++0x-compat -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX98 %s
      4 // RUN: %clang -std=c++0x %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX11 %s
      5 // RUN: %clang -std=gnu++0x %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX11 %s
      6 // RUN: %clang -std=c++11 %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX11 %s
      7 // RUN: %clang -std=gnu++11 %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX11 %s
      8 
      9 void f(int n) {
     10   typeof(n)();
     11   decltype(n)();
     12 }
     13 
     14 // CXX98: undeclared identifier 'typeof'
     15 // CXX98: undeclared identifier 'decltype'
     16 
     17 // GNUXX98-NOT: undeclared identifier 'typeof'
     18 // GNUXX98: undeclared identifier 'decltype'
     19 
     20 // CXX11: undeclared identifier 'typeof'
     21 // CXX11-NOT: undeclared identifier 'decltype'
     22 
     23 // GNUXX11-NOT: undeclared identifier 'typeof'
     24 // GNUXX11-NOT: undeclared identifier 'decltype'
     25