[cfe-dev] OpenCL vec_step feature implementation
anton.yartsev at gmail.com
Tue Feb 15 20:51:03 PST 2011
thanks for the patch!
> --- include/clang/Basic/DiagnosticSemaKinds.td (revision 125563)
> +++ include/clang/Basic/DiagnosticSemaKinds.td (working copy)
> +def err_vecstep_not_in_opencl : Error<
> + "usage of vec_step operator is allowed in OpenCL only">;
> In fact, vec_step is also used in AltiVec (see PIM 2.5.3, where it is
> properly called an operator).
Exactly! vec_step for AltiVec can be simply implemented in the header
via overloaded functions but the suggested implementation is more correct.
I'll take care of working it with AltiVec also.
>> - still long and ugly, but generic. I'll be happy to get your ideas about
>> the name.
> Perhaps UnaryOperatorOnExprOrType?
Or UnaryOpOnExprOrType? :)
Comment on the patch:
> --- include/clang/Sema/Sema.h (revision 125563)
> +++ include/clang/Sema/Sema.h (working copy)
> @@ -23,6 +23,7 @@
> #include "clang/AST/Expr.h"
> #include "clang/AST/DeclarationName.h"
> #include "clang/AST/ExternalASTSource.h"
> +#include "clang/AST/Expr.h"
What about Expr.h included two lines above?
More information about the cfe-dev