Commit Graph

9 Commits

Author SHA1 Message Date
Saleem Abdulrasool 6f0e52207c Sema: handle `wint_t` more carefully for printf checking
In the case that `win_t` is an `unsigned short` (e.g. on Windows), we would
previously incorrectly diagnose the conversion because we would immediately
promote the argument type from `wint_t` (aka `unsigned short`) to `int` before
checking if the type matched.  This should repair the Windows hosted bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342565 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-19 18:13:34 +00:00
Saleem Abdulrasool 9e910c672d Basic: correct `__WINT_TYPE__` on Windows
Windows uses `unsigned short` for `wint_t`.  Correct the type definition as
vended by the compiler.  This type is defined in corecrt.h and is
unconditionally typedef'ed.  cl does not have an equivalent to `__WINT_TYPE__`
which is why this was never detected.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342557 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-19 16:18:55 +00:00
Hans Wennborg 399adce235 MS format strings: parse the 'Z' printf conversion specifier (PR20808)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217326 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-07 03:03:51 +00:00
Hans Wennborg 3d8ef1f21d MS format strings: allow the 'h' length modifier with C, C, s and S (PR20808)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217196 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-04 21:39:52 +00:00
Hans Wennborg 341ba57ec5 MS format strings: support the 'w' length modifier (PR20808)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217195 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-04 21:39:46 +00:00
Richard Smith 4b691c5dee PR20356: Fix all Sema warnings with mismatched ext_/warn_ versus
ExtWarn/Warnings. Mostly the name of the warning was changed to match the
semantics, but in the PR20356 cases, the warning was about valid code, so the
diagnostic was changed from ExtWarn to Warning instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213443 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-19 01:39:17 +00:00
David Majnemer 6a5526046b Typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188996 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-22 10:04:41 +00:00
David Majnemer df72071db0 Analysis: Make %I in printf more reasonable, add more tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188992 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-22 07:53:21 +00:00
David Majnemer 47ad6ce1af Analysis: Add support for MS specific printf format specifiers
Summary: Adds support for %I, %I32 and %I64.

Reviewers: hans, jordan_rose, rnk, majnemer

Reviewed By: majnemer

CC: cfe-commits, cdavis5x

Differential Revision: http://llvm-reviews.chandlerc.com/D1456

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188937 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21 21:54:46 +00:00