[cfe-commits] [PATCH] Fix wint_t handling and regression test on ARM

James Molloy james.molloy at arm.com
Thu May 3 06:15:03 PDT 2012


Hi,

Chenwj has been doing release testing on ARM and brought one nontrivial test
failure to my attention: Sema/format-strings.c.

The test, IMHO, is wrong in several ways (relying on wchar_t and wint_t
without including stddef.h), but fixing it exposed bugs in Clang's handling
of the wint_t type.

The attached patch fixes this. Basically Clang assumed that wint_t could
always be represented as an integer-promoted version of wchar_t, which is
not the case as they may differ in signedness (or wint_t may be larger than
an int type).

TargetInfo has this data, but it wasn't being passed through to ASTContext
for the Analysis library to get its hands on. This patch changes that.

Patch is up for review on review board (still alpha-testing it, we'll see
how it goes :/) here: http://llvm.org/reviews/r/8

Please review!

Cheers,

James







More information about the cfe-commits mailing list