[PATCH] D34031: [OpenCL] Diagnose some reserved types
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 5 12:23:08 PDT 2017
yaxunl added a comment.
Sorry for the delay.
The spec says:
The data type names described in the table below are reserved and cannot be used by applications as user-defined type names.
However, it does not forbid using the reserved types as builtin types if the compiler supports it.
I would suggest to emit warning instead of error.
================
Comment at: lib/Sema/SemaType.cpp:1366
}
+ else if (S.getLangOpts().OpenCL) {
+ // OpenCL v2.0 s6.1.4: 'long long' is a reserved data type.
----------------
Please put `else` on the same line as `}` to be consistent with the rest of the code. same as below.
https://reviews.llvm.org/D34031
More information about the cfe-commits
mailing list