[PATCH] D131555: [Clang] Propagate const context info when emitting compound literal

Victor Campos via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 11 02:36:12 PDT 2022


vhscampos added inline comments.


================
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:2217
   assert(E->isFileScope() && "not a file-scope compound literal expr");
-  return tryEmitGlobalCompoundLiteral(*this, nullptr, E);
+  ConstantEmitter emitter(*this, nullptr);
+  return tryEmitGlobalCompoundLiteral(emitter, E);
----------------
This constructor has the second parameter optional anyway. I suggest you omit the nullptr here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131555/new/

https://reviews.llvm.org/D131555



More information about the cfe-commits mailing list