[PATCH] D26196: Add support for non-zero null pointers

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 10 12:00:06 PST 2016


yaxunl updated this revision to Diff 77525.
yaxunl marked an inline comment as done.
yaxunl added a comment.

Changed APValue to differentiate with null pointer and pointers casted from integer. Fixed casting integer to pointer.

Refactored isNullPtrZero to use just QualType as parameter.

Added tests for casting integer to pointer, initialization of static and function-scope variable, and cast pointer to bool.


https://reviews.llvm.org/D26196

Files:
  include/clang/AST/APValue.h
  lib/AST/APValue.cpp
  lib/AST/ExprConstant.cpp
  lib/CodeGen/CGDecl.cpp
  lib/CodeGen/CGExprAgg.cpp
  lib/CodeGen/CGExprConstant.cpp
  lib/CodeGen/CGExprScalar.cpp
  lib/CodeGen/CodeGenModule.h
  lib/CodeGen/CodeGenTypes.cpp
  lib/CodeGen/TargetInfo.cpp
  lib/CodeGen/TargetInfo.h
  test/CodeGenOpenCL/amdgpu-nullptr.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26196.77525.patch
Type: text/x-patch
Size: 39994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161110/bb555f2e/attachment-0001.bin>


More information about the cfe-commits mailing list