[PATCH] D142384: [C++20] Fix a crash with modules.
Utkarsh Saxena via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 24 01:31:48 PST 2023
usaxena95 updated this revision to Diff 491661.
usaxena95 edited the summary of this revision.
usaxena95 added a comment.
Use `getDefinition`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142384/new/
https://reviews.llvm.org/D142384
Files:
clang/lib/AST/ExprConstant.cpp
Index: clang/lib/AST/ExprConstant.cpp
===================================================================
--- clang/lib/AST/ExprConstant.cpp
+++ clang/lib/AST/ExprConstant.cpp
@@ -6229,6 +6229,8 @@
return false;
const CXXRecordDecl *RD = Definition->getParent();
+ assert(RD->hasDefinition());
+ RD->getDefinition();
if (RD->getNumVBases()) {
Info.FFDiag(CallLoc, diag::note_constexpr_virtual_base) << RD;
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142384.491661.patch
Type: text/x-patch
Size: 445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230124/4e71df43/attachment.bin>
More information about the cfe-commits
mailing list