[clang] [clang] Reject incomplete type arguments for __builtin_dump_struct (PR #72749)

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 18 13:46:20 PST 2023


================
@@ -713,6 +713,11 @@ static ExprResult SemaBuiltinDumpStruct(Sema &S, CallExpr *TheCall) {
     return ExprError();
   }
   const RecordDecl *RD = PtrArgType->getPointeeType()->getAsRecordDecl();
+  if (!RD->isCompleteDefinition()) {
----------------
zygoloid wrote:

You need to use `RequireCompleteType` here to properly trigger instantiation of templated classes and handle definition visibility checking for modules.

https://github.com/llvm/llvm-project/pull/72749


More information about the cfe-commits mailing list