Douglas Gregor | c2c1144 | 2011-10-25 03:07:45 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wc++11-compat %s |
Daniel Dunbar | 8bf0ccd | 2009-07-25 12:47:38 +0000 | [diff] [blame] | 2 | |
Anders Carlsson | d5940ce | 2009-07-09 22:00:53 +0000 | [diff] [blame] | 3 | int& a(); |
| 4 | |
| 5 | void f() { |
Richard Smith | 98d86b9 | 2011-10-11 19:57:52 +0000 | [diff] [blame] | 6 | decltype(a()) c; // expected-warning {{'decltype' is a keyword in C++11}} expected-error {{use of undeclared identifier 'decltype'}} |
Anders Carlsson | d5940ce | 2009-07-09 22:00:53 +0000 | [diff] [blame] | 7 | } |