Skip to content

[HLSL][NFC] Initialize DiagnoseHLSLAvailability members #100778

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 1 commit into from
Jul 30, 2024

Conversation

hekota
Copy link
Member

@hekota hekota commented Jul 26, 2024

Improves readability and removes static verifier trigger.

Improves readability and removes static verifier trigger.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" HLSL HLSL Language Support labels Jul 26, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 26, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-hlsl

Author: Helena Kotas (hekota)

Changes

Improves readability and removes static verifier trigger.


Full diff: https://github.com/llvm/llvm-project/pull/100778.diff

1 Files Affected:

  • (modified) clang/lib/Sema/SemaHLSL.cpp (+4-1)
diff --git a/clang/lib/Sema/SemaHLSL.cpp b/clang/lib/Sema/SemaHLSL.cpp
index 9940bc5b4a606..11686db117ff4 100644
--- a/clang/lib/Sema/SemaHLSL.cpp
+++ b/clang/lib/Sema/SemaHLSL.cpp
@@ -650,7 +650,10 @@ class DiagnoseHLSLAvailability
   bool HasMatchingEnvironmentOrNone(const AvailabilityAttr *AA);
 
 public:
-  DiagnoseHLSLAvailability(Sema &SemaRef) : SemaRef(SemaRef) {}
+  DiagnoseHLSLAvailability(Sema &SemaRef)
+      : SemaRef(SemaRef),
+        CurrentShaderEnvironment(llvm::Triple::UnknownEnvironment),
+        CurrentShaderStageBit(0), ReportOnlyShaderStageIssues(false) {}
 
   // AST traversal methods
   void RunOnTranslationUnit(const TranslationUnitDecl *TU);

@llvm-beanz
Copy link
Collaborator

Does this have any behavior change that can be tested?

@hekota
Copy link
Member Author

hekota commented Jul 26, 2024

Does this have any behavior change that can be tested?

No, it does not. I'll add [NFC] to the title.

@hekota hekota changed the title [HLSL] Initialize DiagnoseHLSLAvailability members [HLSL][NFC] Initialize DiagnoseHLSLAvailability members Jul 26, 2024
@hekota hekota merged commit cc7aef9 into llvm:main Jul 30, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category HLSL HLSL Language Support
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants