arsenm closed this revision.
arsenm added a comment.
r348084
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55023/new/
https://reviews.llvm.org/D55023
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mail
arsenm marked an inline comment as done.
arsenm added inline comments.
Comment at: test/SemaOpenCL/printf-format-strings.cl:65
+{
+printf("%v4f\n", arg); // expected-warning {{format specifies type 'double
__attribute__((ext_vector_type(4)))' but the argument has type 'float
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM! Thanks!
Comment at: test/SemaOpenCL/printf-format-strings.cl:65
+{
+printf("%v4f\n", arg); // expected-warning {{format specifies type 'double
__attribute__(
arsenm updated this revision to Diff 175920.
arsenm added a comment.
Add tests without fp64
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55023/new/
https://reviews.llvm.org/D55023
Files:
include/clang/AST/FormatString.h
lib/AST/FormatString.cpp
lib/AST/FormatStringParsing.h
li
arsenm marked an inline comment as done.
arsenm added inline comments.
Comment at: test/SemaOpenCL/printf-format-strings.cl:65
+{
+printf("%v4f\n", arg); // expected-warning {{format specifies type 'double
__attribute__((ext_vector_type(4)))' but the argument has type 'float
Anastasia added inline comments.
Comment at: test/SemaOpenCL/printf-format-strings.cl:65
+{
+printf("%v4f\n", arg); // expected-warning {{format specifies type 'double
__attribute__((ext_vector_type(4)))' but the argument has type 'float2' (vector
of 2 'float' values)}}
}
arsenm marked an inline comment as done.
arsenm added inline comments.
Comment at: test/SemaOpenCL/printf-format-strings.cl:65
+{
+printf("%v4f\n", arg); // expected-warning {{format specifies type 'double
__attribute__((ext_vector_type(4)))' but the argument has type 'float
arsenm marked an inline comment as done and an inline comment as not done.
arsenm added inline comments.
Comment at: test/SemaOpenCL/printf-format-strings.cl:65
+{
+printf("%v4f\n", arg); // expected-warning {{format specifies type 'double
__attribute__((ext_vector_type(4)))
arsenm marked 2 inline comments as done.
arsenm added inline comments.
Comment at: test/SemaOpenCL/format-strings-fixit.cl:13
+void vector_fixits() {
+// printf("%f", (int) 123);
+ printf("%v4f", (int4) 123);
Anastasia wrote:
> Does this not work yet?
It does.
Anastasia added inline comments.
Comment at: test/SemaOpenCL/format-strings-fixit.cl:13
+void vector_fixits() {
+// printf("%f", (int) 123);
+ printf("%v4f", (int4) 123);
Does this not work yet?
Comment at: test/SemaOpenCL/printf-format-strin
arsenm created this revision.
arsenm added a reviewer: Anastasia.
Herald added subscribers: yaxunl, wdng.
The vector modifier is considered separate, so
don't treat it as a conversion specifier.
This is still not warning on some cases, like
using a type that isn't a valid vector element.
11 matches
Mail list logo