bolt/deps/llvm-18.1.8/clang/test/SemaCXX/auto-invalid-init-crash.cpp

10 lines
311 B
C++
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fno-recovery-ast -verify %s
namespace std {
template <typename>
class initializer_list{};
int a;
auto c = a, &d = {a}; // expected-error {{'auto' deduced as 'int'}} \
expected-error {{non-const lvalue reference to type}}
} // namespace std