forked from OpenCilk/opencilk-project
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SemaExpr] Fix type checking for default-lvalue conversions that invo…
…lve hyperobjects.
- Loading branch information
Showing
2 changed files
with
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Check that calling delete on a hyperobject produces a useful error message. | ||
// | ||
// RUN: %clang_cc1 %s -xc++ -fopencilk -verify -fsyntax-only | ||
struct S { | ||
int x, y; | ||
}; | ||
void identity(void *v); | ||
void reduce(void *l, void *r); | ||
using S_r = S _Hyperobject(identity, reduce); | ||
|
||
class Foo { | ||
S_r r; // expected-warning{{reducer callbacks not implemented for structure members}} | ||
public: | ||
~Foo() { delete r; }; // expected-error{{cannot delete expression of type 'S_r' (aka 'S _Hyperobject(identity, reduce)')}} | ||
}; |