Skip to content

[HLSL 2021] Allow dependent non-type parameters#4100

Merged
llvm-beanz merged 1 commit intomicrosoft:masterfrom
llvm-beanz:cbieneman/dependent-constant-int
Nov 24, 2021
Merged

[HLSL 2021] Allow dependent non-type parameters#4100
llvm-beanz merged 1 commit intomicrosoft:masterfrom
llvm-beanz:cbieneman/dependent-constant-int

Conversation

@llvm-beanz
Copy link
Copy Markdown
Collaborator

Non-type template parameters need more complicated constant resolution
because they need to look through layers of templates. This change
makes it so that when evaluating integer constants we use C++ 11
constant expression evaluation to look through template instantiations.

@llvm-beanz llvm-beanz added the hlsl2021 Pertaining to HLSL2021 features label Nov 24, 2021
@llvm-beanz llvm-beanz requested a review from tex3d November 24, 2021 17:31
Copy link
Copy Markdown
Contributor

@tex3d tex3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Non-type template parameters need more complicated constant resolution
because they need to look through layers of templates. This change
makes it so that when evaluating integer constants we use C++ 11
constant expression evaluation to look through template instantiations.

'beanz/cbieneman/dependent-constant-int'.
../tools/clang/test/HLSLFileCheck/hlsl/template/DependentNonTypeParam.hl
sl
@llvm-beanz llvm-beanz force-pushed the cbieneman/dependent-constant-int branch from 8c56fe8 to 6d8a6ad Compare November 24, 2021 18:16
@AppVeyorBot
Copy link
Copy Markdown

@AppVeyorBot
Copy link
Copy Markdown

@llvm-beanz llvm-beanz merged commit 676fe64 into microsoft:master Nov 24, 2021
@llvm-beanz llvm-beanz deleted the cbieneman/dependent-constant-int branch December 22, 2021 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hlsl2021 Pertaining to HLSL2021 features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants