-
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.
[OpenACC] Implement 'collapse' clause parsing.
The 'collapse' clause takes an optional 'force:' followed by an integer constant expression. For now, parse this as an assignment expression, and we'll check it for value/ICE later.
- Loading branch information
1 parent
82811a8
commit 3a82a1c
Showing
4 changed files
with
78 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// RUN: %clang_cc1 %s -verify -fopenacc | ||
|
||
template<unsigned I, typename T> | ||
void templ() { | ||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc loop collapse(I) | ||
for(;;){} | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc loop collapse(T::value) | ||
for(;;){} | ||
} | ||
|
||
struct S { | ||
static constexpr unsigned value = 5; | ||
}; | ||
|
||
void use() { | ||
templ<7, S>(); | ||
} |