-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hyperobject struct members must be initialized
- Loading branch information
1 parent
8fab1be
commit d2bea2a
Showing
7 changed files
with
24 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
// RUN: %clang_cc1 %s -fopencilk -verify -fsyntax-only | ||
extern void id(void *), reduce(void *, void *); | ||
struct one_hyperobject { | ||
struct uninit_hyperobject { | ||
// expected-note@-1{{implicit copy}} | ||
// expected-note@-2{{implicit move}} | ||
// expected-note@-3{{implicit default}} | ||
int _Hyperobject(id, reduce) field; | ||
// expected-note@-1{{would not be initialized}} | ||
}; | ||
|
||
// braced initializer lists do not work | ||
one_hyperobject h1 = {-1}; | ||
uninit_hyperobject h1 = {-1}; | ||
// expected-error@-1{{no matching constructor for initialization}} | ||
|
||
one_hyperobject h2; | ||
uninit_hyperobject h2; | ||
// expected-error@-1{{implicitly-deleted default constructor}} | ||
|
||
struct init_hyperobject { | ||
int _Hyperobject(id, reduce) field = 0; | ||
}; | ||
|
||
init_hyperobject h3; |
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