Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AST] Suppress the spammy "attempt to use a deleted fucntion" diagnos…
…tic. Summary: This patch fixes the regression diagnostic, which was introduced in https://reviews.llvm.org/D77395. Reviewers: sammccall Reviewed By: sammccall Subscribers: rsmith, adamcz, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D78100
- Loading branch information
Showing
3 changed files
with
25 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// RUN: %clang_cc1 %s -fsyntax-only -frecovery-ast -verify -std=c++11 | ||
|
||
// NOTE: the test can be merged into existing tests once -frecovery-ast is on | ||
// by default. | ||
|
||
struct Foo { // expected-note {{candidate constructor (the implicit copy constructor) not viable}} | ||
Foo(int); // expected-note {{candidate constructor not viable}} | ||
~Foo() = delete; | ||
}; | ||
|
||
void test() { | ||
// we expect the "attempt to use a deleted function" diagnostic is suppressed. | ||
Foo foo; // expected-error {{no matching constructor for initialization of}} | ||
} |