[PATCH] D145123: Call MarkVirtualMembersReferenced on an actual class definition

Stephan Bergmann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 1 14:51:21 PST 2023


sberg added inline comments.


================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:17940
   LoadExternalVTableUses();
   Class = Class->getCanonicalDecl();
   std::pair<llvm::DenseMap<CXXRecordDecl *, bool>::iterator, bool>
----------------
That call of `getCanonicalDecl` originated with <https://github.com/llvm/llvm-project/commit/88d292ccb86c10857298c252bb93331f7ef2258a> "Rework when and how vtables are emitted, by tracking where vtables are", and I wonder if more of the uses of the modified `Class` below suffer from the same issue, that they expect `Class` to represent a definition when it might potentially reference just a declaration.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145123



More information about the cfe-commits mailing list