[PATCH] D47290: [Sema] -Wformat-pedantic only for NSInteger/NSUInteger %zu/%zi on Darwin
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 24 09:41:46 PDT 2018
ahatanak added inline comments.
================
Comment at: test/SemaObjC/format-size-spec-nsinteger.m:18
+ NSUInteger j = 0;
+ NSLog(@"max NSInteger = %zi", i); // CHECK: values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead
+ NSLog(@"max NSUinteger = %zu", j); // CHECK: values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead
----------------
This test looks identical to test/SemaObjC/format-size-spec-nsinteger-nopedantic.m except for the CHECK lines. You can probably merge the two files if you separate the CHECK lines from the lines that call NSLog (see test/Sema/format-strings-darwin.c for example).
Repository:
rC Clang
https://reviews.llvm.org/D47290
More information about the cfe-commits
mailing list