diff options
Diffstat (limited to 'clang/test/SemaCXX/PR10458.cpp')
-rw-r--r-- | clang/test/SemaCXX/PR10458.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/PR10458.cpp b/clang/test/SemaCXX/PR10458.cpp new file mode 100644 index 0000000..57588eb --- /dev/null +++ b/clang/test/SemaCXX/PR10458.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98 + +void f() { + int arr[] = { 1, 2, 3 }; + for (auto &i : arr) { // expected-warning {{'auto' type specifier is a C++11 extension}} expected-warning {{range-based for loop is a C++11 extension}} + } +} |