Skip to content

Conversation

@andykaylor
Copy link
Contributor

A recent change introduced a failure in debug builds due to an incorrect level of indirection inside an assert. This fixes that.

A recent change introduced a failure in debug builds due to an incorrect
level of indirection inside an assert. This fixes that.
@llvmbot llvmbot added clang Clang issues not falling into any other category ClangIR Anything related to the ClangIR project labels Nov 26, 2025
@andykaylor andykaylor enabled auto-merge (squash) November 26, 2025 19:33
@llvmbot
Copy link
Member

llvmbot commented Nov 26, 2025

@llvm/pr-subscribers-clang

Author: Andy Kaylor (andykaylor)

Changes

A recent change introduced a failure in debug builds due to an incorrect level of indirection inside an assert. This fixes that.


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

1 Files Affected:

  • (modified) clang/lib/CIR/CodeGen/CIRGenFunction.cpp (+1-1)
diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
index 5150a1682f712..22128ed3521f8 100644
--- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
@@ -1142,7 +1142,7 @@ CIRGenFunction::VlaSizePair
 CIRGenFunction::getVLAElements1D(const VariableArrayType *vla) {
   mlir::Value vlaSize = vlaSizeMap[vla->getSizeExpr()];
   assert(vlaSize && "no size for VLA!");
-  assert(vlaSize->getType() == sizeTy);
+  assert(vlaSize.getType() == sizeTy);
   return {vlaSize, vla->getElementType()};
 }
 

@llvmbot
Copy link
Member

llvmbot commented Nov 26, 2025

@llvm/pr-subscribers-clangir

Author: Andy Kaylor (andykaylor)

Changes

A recent change introduced a failure in debug builds due to an incorrect level of indirection inside an assert. This fixes that.


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

1 Files Affected:

  • (modified) clang/lib/CIR/CodeGen/CIRGenFunction.cpp (+1-1)
diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
index 5150a1682f712..22128ed3521f8 100644
--- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
@@ -1142,7 +1142,7 @@ CIRGenFunction::VlaSizePair
 CIRGenFunction::getVLAElements1D(const VariableArrayType *vla) {
   mlir::Value vlaSize = vlaSizeMap[vla->getSizeExpr()];
   assert(vlaSize && "no size for VLA!");
-  assert(vlaSize->getType() == sizeTy);
+  assert(vlaSize.getType() == sizeTy);
   return {vlaSize, vla->getElementType()};
 }
 

Copy link
Member

@AmrDeveloper AmrDeveloper left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks

@andykaylor andykaylor merged commit cabcb5a into llvm:main Nov 26, 2025
10 of 12 checks passed
@andykaylor andykaylor deleted the cir-fix-debug-build branch November 26, 2025 20:01
tanji-dg pushed a commit to tanji-dg/llvm-project that referenced this pull request Nov 27, 2025
A recent change introduced a failure in debug builds due to an incorrect
level of indirection inside an assert. This fixes that.
GeneraluseAI pushed a commit to GeneraluseAI/llvm-project that referenced this pull request Nov 27, 2025
A recent change introduced a failure in debug builds due to an incorrect
level of indirection inside an assert. This fixes that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category ClangIR Anything related to the ClangIR project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants