bolt/deps/llvm-18.1.8/clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p1-cxx0x.cpp

8 lines
318 B
C++
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
void f() {
int b[5];
auto a[5] = b; // expected-error{{variable 'a' with type 'auto[5]' has incompatible initializer of type 'int[5]'}}
auto *c[5] = b; // expected-error{{variable 'c' with type 'auto *[5]' has incompatible initializer of type 'int[5]'}}
}