diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-15 05:42:01 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-15 05:42:01 +0000 |
commit | 0aa86c0463a881be85fd34e04c7de3379997621d (patch) | |
tree | d7ca22480268c94ba0531ad35522a00970b932bd /test/SemaCXX/cxx98-compat.cpp | |
parent | 7fe6208c3fa91f835813bb78236ef5c2bbf81053 (diff) |
Add -Wc++98-compat warning for deduced 'auto' type specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/cxx98-compat.cpp')
-rw-r--r-- | test/SemaCXX/cxx98-compat.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx98-compat.cpp b/test/SemaCXX/cxx98-compat.cpp index d4c433e008..927df1f971 100644 --- a/test/SemaCXX/cxx98-compat.cpp +++ b/test/SemaCXX/cxx98-compat.cpp @@ -87,3 +87,6 @@ template<typename T> using AliasTemplate = T; // expected-warning {{alias declar inline namespace N { // expected-warning {{inline namespaces are incompatible with C++98}} } + +auto auto_deduction = 0; // expected-warning {{'auto' type specifier is incompatible with C++98}} +int *p = new auto(0); // expected-warning {{'auto' type specifier is incompatible with C++98}} |