[PATCH, RFC] Fix PR16456 (make bool a context-sensitive keyword in Altivec mode)
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!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6735 bytes
Desc: not available
More information about the cfe-commits