]> granicus.if.org Git - clang/commit
OpenCL: Use length modifier for warning on vector printf arguments
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 29 Jan 2019 20:49:54 +0000 (20:49 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 29 Jan 2019 20:49:54 +0000 (20:49 +0000)
commit14c19d328b66fc5418a577b466e4cfe8a22b1616
tree642e8b571229ff3c359473ac6b351ab93fd3f289
parent4dacf6a24c5207b05cba8c6e2710c2abb9ce1233
OpenCL: Use length modifier for warning on vector printf arguments

Re-enable format string warnings on printf.

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352540 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/FormatString.h
lib/AST/FormatString.cpp
lib/AST/PrintfFormatString.cpp
lib/AST/ScanfFormatString.cpp
lib/Headers/opencl-c.h
lib/Sema/SemaChecking.cpp
test/Sema/format-strings.c
test/SemaOpenCL/format-strings-fixit.cl
test/SemaOpenCL/printf-format-string-warnings.cl
test/SemaOpenCL/printf-format-strings.cl