[PATCH] D38857: [OpenCL] Improve printing and semantic check related to implicit addr space
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 12 11:41:46 PDT 2017
yaxunl created this revision.
There are two issues:
1. only (void*)0 should be treated as nullptr
2. only explicit addr space should be printed
This patch introduces a flag in Qualifier to indicating a non-default address space qualifier is deduced by context. Only
non-implicit address space qualifier will be print out when printing AST. It is also used to identify nullptr.
However this review does not rule out alternative approaches, e.g. using AttributedType. We will explore alternative approaches.
https://reviews.llvm.org/D38857
Files:
include/clang/AST/ASTContext.h
include/clang/AST/Type.h
lib/AST/ASTContext.cpp
lib/AST/Expr.cpp
lib/AST/TypePrinter.cpp
lib/Sema/SemaType.cpp
test/SemaOpenCL/address-spaces-conversions-cl2.0.cl
test/SemaOpenCL/address-spaces.cl
test/SemaOpenCL/atomic-ops.cl
test/SemaOpenCL/invalid-block.cl
test/SemaOpenCL/invalid-pipes-cl2.0.cl
test/SemaOpenCL/null_literal.cl
test/SemaOpenCL/vector_conv_invalid.cl
test/SemaTemplate/address_space-dependent.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38857.118818.patch
Type: text/x-patch
Size: 37416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171012/3b6a89f2/attachment-0001.bin>
More information about the cfe-commits
mailing list