mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 09:36:08 +00:00

Fixes #85447 --- This PR resolves a crash in `ActOnUninitializedDecl` due to an oversight in updating the `isInvalidDecl` state before invocation. The crash occurs due to a missing invocation of `setInvalidDecl()` for an invalid `Anon` declaration. To address this issue, the `setInvalidDecl()` method is now properly invoked to mark the `Anon` declaration as invalid before running `ActOnUninitializedDecl()`.
11 lines
844 B
C++
11 lines
844 B
C++
// RUN: %clang_cc1 -x c++ -fsyntax-only -verify=cxx,expected %s
|
|
|
|
template <class a> using __impl_of = a; // expected-note {{'__impl_of' declared here}} \
|
|
expected-note {{template is declared here}}
|
|
struct { // expected-error {{anonymous structs and classes must be class members}} \
|
|
expected-note {{to match this '{'}}
|
|
__impl_; // expected-error {{no template named '__impl_'; did you mean '__impl_of'?}} \
|
|
expected-error {{cannot specify deduction guide for alias template '__impl_of'}} \
|
|
expected-error {{expected ';' after struct}}
|
|
// expected-error {{expected '}'}}
|