This revision was automatically updated to reflect the committed changes.
Closed by commit rG9fb7e98db5aa: [AST] Fix a crash on accessing a class without
definition in constexpr function… (authored by hokein).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
hokein added a comment.
Thanks for the review!
Comment at: clang/lib/AST/ExprConstant.cpp:4320
+if (!RD->hasDefinition())
+ return APValue();
APValue Struct(APValue::UninitStruct(), RD->getNumBases(),
rsmith wrote:
> hokein wrote:
> > rsmith
hokein updated this revision to Diff 273281.
hokein marked 5 inline comments as done.
hokein added a comment.
address comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80981/new/
https://reviews.llvm.org/D80981
Files:
rsmith accepted this revision.
rsmith marked an inline comment as done.
rsmith added a comment.
This revision is now accepted and ready to land.
Minor suggestions but this LGTM.
Comment at: clang/lib/AST/ExprConstant.cpp:4320
+if (!RD->hasDefinition())
+ return
hokein added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:4320
+if (!RD->hasDefinition())
+ return APValue();
APValue Struct(APValue::UninitStruct(), RD->getNumBases(),
rsmith wrote:
> hokein wrote:
> > rsmith wrote:
> > > hokein
hokein updated this revision to Diff 272018.
hokein marked an inline comment as done.
hokein added a comment.
Update per Richard's comment: do the error check in getDefaultInitValue, and
modify every caller of it to support the error handling.
Repository:
rG LLVM Github Monorepo
CHANGES
hokein updated this revision to Diff 272019.
hokein added a comment.
cleanup the debug code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80981/new/
https://reviews.llvm.org/D80981
Files:
clang/lib/AST/ExprConstant.cpp
rsmith added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:4320
+if (!RD->hasDefinition())
+ return APValue();
APValue Struct(APValue::UninitStruct(), RD->getNumBases(),
hokein wrote:
> rsmith wrote:
> > hokein wrote:
> > > sammccall
hokein marked an inline comment as done.
hokein added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:4320
+if (!RD->hasDefinition())
+ return APValue();
APValue Struct(APValue::UninitStruct(), RD->getNumBases(),
rsmith wrote:
> hokein
rsmith added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:4320
+if (!RD->hasDefinition())
+ return APValue();
APValue Struct(APValue::UninitStruct(), RD->getNumBases(),
hokein wrote:
> sammccall wrote:
> > This doesn't look all that
hokein marked an inline comment as done.
hokein added a subscriber: rsmith.
hokein added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:4320
+if (!RD->hasDefinition())
+ return APValue();
APValue Struct(APValue::UninitStruct(), RD->getNumBases(),
sammccall added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:4320
+if (!RD->hasDefinition())
+ return APValue();
APValue Struct(APValue::UninitStruct(), RD->getNumBases(),
This doesn't look all that safe - you're using a `None` value
hokein created this revision.
hokein added a reviewer: sammccall.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80981
Files:
clang/lib/AST/ExprConstant.cpp
clang/test/SemaCXX/constant-expression-cxx2a.cpp
Index:
13 matches
Mail list logo