[PATCH] D142384: [C++20] Fix a crash with modules.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 30 10:27:53 PST 2023


rsmith added inline comments.


================
Comment at: clang/lib/AST/ExprConstant.cpp:6233
+  assert(RD->hasDefinition());
+  RD->getDefinition();
   if (RD->getNumVBases()) {
----------------
I think it would make sense to use the definition of the class as `RD` here, since we're going to be iterating through `RD`'s fields.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142384



More information about the cfe-commits mailing list