Skip to content

Conversation

@andykaylor
Copy link
Contributor

This change removes a bit of code that was left as an artifact of a previous "not yet implemented" state. The implementation is in place, but the code to report an NYI diagnostic was left behind.

This change removes a bit of code that was left as an artifact of a
previous "not yet implemented" state. The implementation is in place,
but the code to report an NYI diagnostic was left behind.
@llvmbot llvmbot added clang Clang issues not falling into any other category ClangIR Anything related to the ClangIR project labels Jun 25, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 25, 2025

@llvm/pr-subscribers-clang

Author: Andy Kaylor (andykaylor)

Changes

This change removes a bit of code that was left as an artifact of a previous "not yet implemented" state. The implementation is in place, but the code to report an NYI diagnostic was left behind.


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

1 Files Affected:

  • (modified) clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp (-8)
diff --git a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
index f17eb73a9f968..05e8848884f7e 100644
--- a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
@@ -614,14 +614,6 @@ CIRGenTypes::computeRecordLayout(const RecordDecl *rd, cir::RecordType *ty) {
     }
   }
 
-  if (llvm::isa<CXXRecordDecl>(rd) && !rd->isUnion() &&
-      !rd->hasAttr<FinalAttr>()) {
-    if (lowering.astRecordLayout.getNonVirtualSize() !=
-        lowering.astRecordLayout.getSize()) {
-      cgm.errorNYI(rd->getSourceRange(), "computeRecordLayout: CXXRecordDecl");
-    }
-  }
-
   // Fill in the record *after* computing the base type.  Filling in the body
   // signifies that the type is no longer opaque and record layout is complete,
   // but we may need to recursively layout rd while laying D out as a base type.

@llvmbot
Copy link
Member

llvmbot commented Jun 25, 2025

@llvm/pr-subscribers-clangir

Author: Andy Kaylor (andykaylor)

Changes

This change removes a bit of code that was left as an artifact of a previous "not yet implemented" state. The implementation is in place, but the code to report an NYI diagnostic was left behind.


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

1 Files Affected:

  • (modified) clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp (-8)
diff --git a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
index f17eb73a9f968..05e8848884f7e 100644
--- a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
@@ -614,14 +614,6 @@ CIRGenTypes::computeRecordLayout(const RecordDecl *rd, cir::RecordType *ty) {
     }
   }
 
-  if (llvm::isa<CXXRecordDecl>(rd) && !rd->isUnion() &&
-      !rd->hasAttr<FinalAttr>()) {
-    if (lowering.astRecordLayout.getNonVirtualSize() !=
-        lowering.astRecordLayout.getSize()) {
-      cgm.errorNYI(rd->getSourceRange(), "computeRecordLayout: CXXRecordDecl");
-    }
-  }
-
   // Fill in the record *after* computing the base type.  Filling in the body
   // signifies that the type is no longer opaque and record layout is complete,
   // but we may need to recursively layout rd while laying D out as a base type.

@andykaylor
Copy link
Contributor Author

I'm merging this before review because another change that I'm ready to push for review depends on it.

@andykaylor andykaylor merged commit 79da5fe into llvm:main Jun 25, 2025
8 of 10 checks passed
@andykaylor andykaylor deleted the cir-dup-error branch June 25, 2025 21:46
anthonyhatran pushed a commit to anthonyhatran/llvm-project that referenced this pull request Jun 26, 2025
This change removes a bit of code that was left as an artifact of a
previous "not yet implemented" state. The implementation is in place,
but the code to report an NYI diagnostic was left behind.
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.

2 participants