-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sema]
setInvalidDecl
for error deduction declaration
Fixed: #62408 `setInvalidDecl` for invalid `CXXDeductionGuideDecl` to avoid crashes during semantic analysis. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D149516
- Loading branch information
1 parent
4edaacf
commit ca96836
Showing
8 changed files
with
30 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
clang/test/SemaCXX/invalid-deduction-guide-as-template-candidates.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s | ||
|
||
template <class T> class Foo {}; // expected-note {{candidate template ignored: couldn't infer template argument 'T'}} \ | ||
// expected-note {{candidate function template not viable: requires 1 argument, but 0 were provided}} | ||
Foo(); // expected-error {{deduction guide declaration without trailing return type}} | ||
Foo vs; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'Foo'}} |