Skip to content

[mlir] Fix uninitialized boolean issue #145466

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

Closed

Conversation

chios202
Copy link
Contributor

@chios202 chios202 commented Jun 24, 2025

This pull request fixes uninitialized boolean found #141423 (comment)

@chios202 chios202 marked this pull request as ready for review June 24, 2025 06:13
@llvmbot llvmbot added the mlir label Jun 24, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 24, 2025

@llvm/pr-subscribers-mlir

Author: Denzel-Brian Budii (chios202)

Changes

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

1 Files Affected:

  • (modified) mlir/lib/Query/Matcher/VariantValue.cpp (+1-1)
diff --git a/mlir/lib/Query/Matcher/VariantValue.cpp b/mlir/lib/Query/Matcher/VariantValue.cpp
index 7bf4774dba830..a4aed69875774 100644
--- a/mlir/lib/Query/Matcher/VariantValue.cpp
+++ b/mlir/lib/Query/Matcher/VariantValue.cpp
@@ -172,7 +172,7 @@ void VariantValue::setSigned(int64_t newValue) {
 // Boolean
 bool VariantValue::isBoolean() const { return type == ValueType::Boolean; }
 
-bool VariantValue::getBoolean() const { return value.Signed; }
+bool VariantValue::getBoolean() const { return value.Boolean; }
 
 void VariantValue::setBoolean(bool newValue) {
   type = ValueType::Boolean;

@dbudii dbudii force-pushed the fix-uninitialized-value-builder-issue branch from b7495bc to 2eb1504 Compare June 24, 2025 06:35
@chios202 chios202 force-pushed the fix-uninitialized-value-builder-issue branch 3 times, most recently from f151c8e to 798cd30 Compare June 24, 2025 06:44
@chios202 chios202 closed this Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants