-
Notifications
You must be signed in to change notification settings - Fork 744
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL] Disable clang pedantic diagnostics in header/footer (#15171)
When -Wreserved-identifer or -Wold-style-cast is enabled, some of the constructs used in integration headers and footers for device_globals and host_pipes trigger a diagnostic. This change adds a pragma to the generated files that suppress the diagnostic prior to the construct and reenabled the diagnostic after.
- Loading branch information
1 parent
e8fcff1
commit 4140240
Showing
6 changed files
with
64 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
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,8 @@ | ||
// RUN: %clangxx -fsycl -Werror=reserved-identifier -Werror=old-style-cast %s | ||
|
||
// Check that the generated header and footer files do not generate | ||
// errors when pedantic warnings are enabled. | ||
|
||
#include <sycl/sycl.hpp> | ||
sycl::ext::oneapi::experimental::device_global<int> devGlobVar; | ||
int main(int argc, char **argv) { return 0; } |