[PATCH, RFC] Fix PR16456 (make bool a context-sensitive keyword in Altivec mode)
Bill Schmidt
wschmidt at linux.vnet.ibm.com
Wed Jul 3 12:32:29 PDT 2013
"bool" should be a context-sensitive keyword in Altivec mode.
PR16456 reported that Clang implements a hybrid between AltiVec's
"Keyword and Predefine Method" and its "Context Sensitive Keyword
Method," where "bool" is always a keyword, but "vector" and "pixel"
are context-sensitive keywords. This isn't permitted by the AltiVec
spec. For consistency with gcc, this patch implements the Context
Sensitive Keyword Method for bool, and stops treating true and false
as keywords in Altivec mode.
The patch removes KEYALTIVEC as a trigger for defining these keywords
in include/clang/Basic/TokenKinds.def, and adds logic for "vector
bool" that mirrors the existing logic for "vector pixel." The test
case is taken from the bug report.
I know very little about the front end, so I would appreciate some
review prior to committing the patch. Thanks!
Bill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr16456-2013-07-03.patch
Type: text/x-patch
Size: 6735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130703/9a74e4fc/attachment.bin>
More information about the cfe-commits
mailing list