This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2c26397f76d9: [clang][ConstExprEmitter] handle NullToPointer
ImplicitCastExpr (authored by nickdesaulniers).
Repository:
rG LLVM Github Monorepo
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156175/new/
https://reviews.llvm.org/D156175
___
nickdesaulniers updated this revision to Diff 544126.
nickdesaulniers added a comment.
- rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156175/new/
https://reviews.llvm.org/D156175
Files:
clang/lib/CodeGen/CGExprConstant.cpp
Index: clang
nickdesaulniers added inline comments.
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1131-1132
+case CK_NullToPointer: {
+ if (llvm::Constant *C = Visit(subExpr, destType))
+if (C->isNullValue())
+ return CGM.EmitNullConstant(destType);
--
nickdesaulniers updated this revision to Diff 544113.
nickdesaulniers marked 2 inline comments as done.
nickdesaulniers added a comment.
- remove the check for isNullValue as per @efriedma
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156175/new/
h
efriedma added inline comments.
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1131-1132
+case CK_NullToPointer: {
+ if (llvm::Constant *C = Visit(subExpr, destType))
+if (C->isNullValue())
+ return CGM.EmitNullConstant(destType);
nick
nickdesaulniers added inline comments.
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1131-1132
+case CK_NullToPointer: {
+ if (llvm::Constant *C = Visit(subExpr, destType))
+if (C->isNullValue())
+ return CGM.EmitNullConstant(destType);
--
efriedma added inline comments.
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1131-1132
+case CK_NullToPointer: {
+ if (llvm::Constant *C = Visit(subExpr, destType))
+if (C->isNullValue())
+ return CGM.EmitNullConstant(destType);
nick
nickdesaulniers added inline comments.
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1131-1132
+case CK_NullToPointer: {
+ if (llvm::Constant *C = Visit(subExpr, destType))
+if (C->isNullValue())
+ return CGM.EmitNullConstant(destType);
--
nickdesaulniers created this revision.
Herald added a subscriber: inglorion.
Herald added a project: All.
nickdesaulniers requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Consider the following statement:
void* foo = ((void *)0);
For the
10 matches
Mail list logo