t.p.northover closed this revision.
t.p.northover added a comment.
Thanks Richard. I've committed this as r303957.
https://reviews.llvm.org/D33568
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Thanks!
https://reviews.llvm.org/D33568
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cf
t.p.northover updated this revision to Diff 100321.
t.p.northover added a comment.
Sounds very reasonable to me. I've uploaded a new diff.
https://reviews.llvm.org/D33568
Files:
clang/lib/AST/ExprConstant.cpp
clang/test/SemaCXX/null-cast.cpp
Index: clang/test/SemaCXX/null-cast.cpp
===
rsmith added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:5498-5500
Result.set((Expr*)nullptr, 0, false, true, Offset);
+Result.getLValueDesignator() =
+SubobjectDesignator(E->getType()->getPointeeType());
This is the only caller o
t.p.northover created this revision.
Herald added a subscriber: mcrosier.
For the simple casts in the test, we were crashing because the
ZeroInitialization function created an LValue with an unexpected
SubobjectDesignator: it was valid but didn't actually refer to a valid
MostDerivedType.
Sinc