-
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] Add 'clause' parsing infrastructure plus a few clauses (#75052
) As we've now finished parsing the constructs, we're moving onto implementing 'clause' parsing. While some are complicated and require their own patch, the handful added here are simple to parse (that is, they are a single identifier). This patch adds the infrastructure to parse these and a clause-list in its entirety. This adds some complication to how we are diagnosing parsing errors elsewhere, so a few changes were made to better recover from errors.
- Loading branch information
1 parent
cdc0392
commit fdee0a3
Showing
9 changed files
with
225 additions
and
67 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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// RUN: %clang_cc1 %s -verify -fopenacc -std=c99 | ||
// RUNX: %clang_cc1 %s -verify -fopenacc | ||
// RUNX: %clang_cc1 %s -verify -fopenacc -x c++ | ||
|
||
void func() { | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc enter data finalize | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc enter data finalize finalize | ||
|
||
// expected-error@+2{{invalid OpenACC clause 'invalid'}} | ||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc enter data finalize invalid | ||
|
||
// expected-error@+2{{invalid OpenACC clause 'invalid'}} | ||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc enter data finalize invalid invalid finalize | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc enter data seq finalize | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc host_data if_present | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc host_data if_present, if_present | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc loop seq independent auto | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc loop seq, independent auto | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc loop seq independent, auto | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc kernels loop seq independent auto | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc serial loop seq, independent auto | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc parallel loop seq independent, auto | ||
|
||
|
||
// expected-error@+2{{expected identifier}} | ||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc loop , seq | ||
|
||
// expected-error@+2{{expected identifier}} | ||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc loop seq, | ||
|
||
} | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc routine worker, vector, seq, nohost | ||
void bar(); | ||
|
||
// expected-warning@+1{{OpenACC directives not yet implemented, pragma ignored}} | ||
#pragma acc routine(bar) worker, vector, seq, nohost |
Oops, something went wrong.