mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 23:26:05 +00:00

We'd also like for "C++11" or "c++11" to be used for the warning groups, but without removing the old warning flags. Patches welcome; I've run out of time to work on this today. llvm-svn: 141801
8 lines
254 B
C++
8 lines
254 B
C++
// 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}}
|
|
}
|
|
}
|