]> granicus.if.org Git - clang/commit
Creating a printing policy for "half":
authorYunzhong Gao <Yunzhong_Gao@playstation.sony.com>
Tue, 18 Mar 2014 17:55:18 +0000 (17:55 +0000)
committerYunzhong Gao <Yunzhong_Gao@playstation.sony.com>
Tue, 18 Mar 2014 17:55:18 +0000 (17:55 +0000)
commit8cd1d73f00a73eb9fb316b2aa808a153d5aca50c
tree62457b0b6148a011afbb8fd854acbe592a99d6f2
parent23f8716a551f958a767ef980b4276acab4edcd1b
Creating a printing policy for "half":
Since "half" is an OpenCL keyword and clang accepts __fp16 as an extension for
other languages, error messages and metadata (and hence debug info) should refer
to the half-precision floating point as "__fp16" instead of "half" when
compiling for non-OpenCL languages. This patch creates a new printing policy for
half in a similar manner to what is done for bool and wchar_t.

Differential Revision: http://llvm-reviews.chandlerc.com/D2952

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204164 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/PrettyPrinter.h
include/clang/Basic/LangOptions.def
include/clang/Basic/TokenKinds.def
lib/AST/Type.cpp
lib/Basic/IdentifierTable.cpp
lib/Frontend/CompilerInvocation.cpp
test/CXX/expr/expr.const/p2-0x.cpp
test/Sema/variadic-promotion.c