[Sema] `setInvalidDecl` for error deduction declaration
authorCongcong Cai <congcongcai0907@163.com>
Tue, 23 May 2023 07:07:03 +0000 (09:07 +0200)
committerCongcong Cai <congcongcai0907@163.com>
Tue, 23 May 2023 07:07:05 +0000 (09:07 +0200)
commiteb5902ffc97163338bab95d2fd84a953ee76e96f
treef5f679bf4d194e9b98789af7cedbdf39e693622f
parentf104eb6e15503b770734e3a59937c9df865b2814
[Sema] `setInvalidDecl` for error deduction declaration

Fixed: https://github.com/llvm/llvm-project/issues/62408
`setInvalidDecl` for invalid `CXXDeductionGuideDecl` to
avoid crashes during semantic analysis.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D149516
clang/docs/ReleaseNotes.rst
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp
clang/test/CXX/temp/temp.res/temp.local/p3.cpp
clang/test/Parser/cxx1z-class-template-argument-deduction.cpp
clang/test/SemaCXX/invalid-deduction-guide-as-template-candidates.cpp [new file with mode: 0644]