[PATCH] D57390: OpenCL: Don't promote vector args to printf
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 29 09:15:51 PST 2019
arsenm created this revision.
arsenm added reviewers: rjmccall, Anastasia.
Herald added subscribers: yaxunl, wdng.
This reverts commit r348083. This was based on misreading the spec for
printf specifiers. Start respecting the length modifier for vectors.
The warnings are still incomplete. Apparently it is undefined to use a
vector specifier without a length modifier, which is not currently
warned on. Additionally, type warnings appear to not be working with
the hh modifier, and aren't warning on all of the special restrictions
from c99 printf.
Fixes bug 40491.
https://reviews.llvm.org/D57390
Files:
include/clang/AST/FormatString.h
lib/AST/FormatString.cpp
lib/AST/PrintfFormatString.cpp
lib/AST/ScanfFormatString.cpp
lib/Sema/SemaChecking.cpp
lib/Sema/SemaExpr.cpp
test/CodeGenOpenCL/printf.cl
test/Sema/format-strings.c
test/SemaOpenCL/format-strings-fixit.cl
test/SemaOpenCL/printf-format-strings.cl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57390.184101.patch
Type: text/x-patch
Size: 27053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190129/109e9fb7/attachment-0001.bin>
More information about the cfe-commits
mailing list