-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[HLSL] Parameter modifier parsing and AST #72139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,12 @@ | ||
// RUN: %clang_cc1 %s -verify | ||
extern groupshared float f; // expected-error{{unknown type name 'groupshared'}} | ||
|
||
extern float groupshared f2; // expected-error{{expected ';' after top level declarator}} | ||
|
||
namespace { | ||
float groupshared [[]] f3 = 12; // expected-error{{expected ';' after top level declarator}} | ||
} | ||
|
||
// expected-error@#fgc{{expected ';' after top level declarator}} | ||
// expected-error@#fgc{{a type specifier is required for all declarations}} | ||
float groupshared const f4 = 12; // #fgc |
This file contains hidden or 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,50 @@ | ||
// RUN: %clang_cc1 %s -verify | ||
|
||
// expected-error@#fn{{unknown type name 'in'}} | ||
// expected-error@#fn{{expected ')'}} | ||
// expected-note@#fn{{to match this '('}} | ||
void fn(in out float f); // #fn | ||
|
||
// expected-error@#fn2{{unknown type name 'in'}} | ||
// expected-error@#fn2{{expected ')'}} | ||
// expected-note@#fn2{{to match this '('}} | ||
void fn2(in in float f); // #fn2 | ||
|
||
// expected-error@#fn3{{unknown type name 'out'}} | ||
// expected-error@#fn3{{expected ')'}} | ||
// expected-note@#fn3{{to match this '('}} | ||
void fn3(out out float f); // #fn3 | ||
|
||
// expected-error@#fn4{{unknown type name 'inout'}} | ||
// expected-error@#fn4{{expected ')'}} | ||
// expected-note@#fn4{{to match this '('}} | ||
void fn4(inout in out float f); // #fn4 | ||
|
||
// expected-error@#fn5{{unknown type name 'inout'}} | ||
// expected-error@#fn5{{expected ')'}} | ||
// expected-note@#fn5{{to match this '('}} | ||
void fn5(inout in float f); // #fn5 | ||
|
||
// expected-error@#fn6{{unknown type name 'inout'}} | ||
// expected-error@#fn6{{expected ')'}} | ||
// expected-note@#fn6{{to match this '('}} | ||
void fn6(inout out float f); // #fn6 | ||
|
||
void implicitFn(float f); | ||
|
||
// expected-error@#inFn{{unknown type name 'in'}} | ||
void inFn(in float f); // #inFn | ||
|
||
// expected-error@#inoutFn{{unknown type name 'inout'}} | ||
void inoutFn(inout float f); // #inoutFn | ||
|
||
// expected-error@#outFn{{unknown type name 'out'}} | ||
void outFn(out float f); // #outFn | ||
|
||
// expected-error@#fn7{{unknown type name 'inout'}} | ||
// expected-error@#fn7{{declaration of 'T' shadows template parameter}} | ||
// expected-error@#fn7{{expected ')'}} | ||
// expected-note@#fn7{{to match this '('}} | ||
template <typename T> // expected-note{{template parameter is declared here}} | ||
void fn7(inout T f); // #fn7 | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.