]> granicus.if.org Git - clang/commit
OpenCL: Improve vector printf warnings
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 1 Dec 2018 22:16:27 +0000 (22:16 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 1 Dec 2018 22:16:27 +0000 (22:16 +0000)
commit938b65e725c6e0a48111f45c8378b575790c9184
treeaac3a60dc65e9518286dc10440aa847963e1d0d7
parent7a6f35c7122ec13f0b63e7cba004b8cee5bc274e
OpenCL: Improve vector printf warnings

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.

Fixes bug 39652

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348084 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/FormatString.h
lib/AST/FormatString.cpp
lib/AST/FormatStringParsing.h
lib/AST/PrintfFormatString.cpp
test/SemaOpenCL/format-strings-fixit.cl [new file with mode: 0644]
test/SemaOpenCL/printf-format-strings.cl