xref: /llvm-project/clang/test/SemaCXX/auto-invalid-init-crash.cpp (revision 482c41e992c1edf8833a4577b56ff9dda49fbc83)
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -fno-recovery-ast -verify %s
2 
3 namespace std {
4 template <typename E>
5 class initializer_list { const E *a, *b; };
6 int a;
7 auto c = a, &d = {a}; // expected-error {{'auto' deduced as 'int'}} \
8                          expected-error {{non-const lvalue reference to type}}
9 } // namespace std
10