[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / decltype-crash.cpp
blob1ffc525a270378622dbafdeebec2f34f45148fe7
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wc++11-compat -std=c++98 %s
3 int& a();
5 void f() {
6 decltype(a()) c; // expected-warning {{'decltype' is a keyword in C++11}} \
7 // expected-error {{use of undeclared identifier 'decltype'}} \
8 // expected-error {{expected ';' after expression}} \
9 // expected-error {{use of undeclared identifier 'c'}}