[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit as r349497, thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 ___ cfe-commits mailing list

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-18 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Thanks, that would be great! Hopefully it will work this time. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM then, thank you for the fix! Would you like me to commit this one for you? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-18 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 178605. ebevhan added a comment. Use `auto`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 Files: lib/Sema/SemaChecking.cpp test/Sema/format-strings-bitfield-promotion.c

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-18 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked an inline comment as done. ebevhan added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7725-7726 +return true; + // Look through vector types, since we do default argument promotion for + // those in OpenCL. + if (const ExtVectorType *VecTy =

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7725-7726 +return true; + // Look through vector types, since we do default argument promotion for + // those in OpenCL. + if (const ExtVectorType *VecTy = From->getAs()) Looking

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-12 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 177831. ebevhan added a comment. Fix the build failures (caused by default argument promotion of float vectors). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 Files: lib/Sema/SemaChecking.cpp

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-12 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Hmm, sorry about that. I'll have a look. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman reopened this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. I had to revert the commit as the changes caused some test failures.

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit in r348889, thank you for the patch! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 ___ cfe-commits mailing list

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-11 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Thanks! I don't have commit access, so I would appreciate it if you could commit the change. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 ___ cfe-commits mailing list

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: test/Sema/format-strings-bitfield-promotion.c:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s +

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-04 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 176571. ebevhan added a comment. Added testing for C++ and different sizes of `int` and `long`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 Files: lib/Sema/SemaChecking.cpp

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-04 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: test/Sema/format-strings-bitfield-promotion.c:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s + aaron.ballman wrote: > ebevhan wrote: > > ebevhan wrote: > > > aaron.ballman wrote: > > > >

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/Sema/format-strings-bitfield-promotion.c:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s + ebevhan wrote: > ebevhan wrote: > > aaron.ballman wrote: > > > aaron.ballman wrote: > >

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked an inline comment as done. ebevhan added inline comments. Comment at: test/Sema/format-strings-bitfield-promotion.c:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s + ebevhan wrote: > aaron.ballman wrote: > >

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked 2 inline comments as done. ebevhan added inline comments. Comment at: test/Sema/format-strings-bitfield-promotion.c:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s + aaron.ballman wrote: > aaron.ballman wrote: > >

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7711-7715 + // It's an integer promotion if the destination type is the promoted + // source type. + return ICE->getCastKind() == CK_IntegralCast && + From->isPromotableIntegerType() && +

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked an inline comment as done. ebevhan added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7711-7715 + // It's an integer promotion if the destination type is the promoted + // source type. + return ICE->getCastKind() == CK_IntegralCast && +

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7711-7715 + // It's an integer promotion if the destination type is the promoted + // source type. + return ICE->getCastKind() == CK_IntegralCast && + From->isPromotableIntegerType() && +

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-11-30 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 176130. ebevhan added a comment. Rebased and addressed review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 Files: lib/Sema/SemaChecking.cpp test/Sema/format-strings-bitfield-promotion.c

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7598-7602 + if (ICE->getCastKind() == CK_IntegralCast && + From->isPromotableIntegerType() && + S.Context.getPromotedIntegerType(From) == To) +return true; + return false;

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-09-20 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Another ping. Anyone up for reviewing this patch? Repository: rC Clang https://reviews.llvm.org/D51211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-09-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Ping. Repository: rC Clang https://reviews.llvm.org/D51211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-08-24 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: krememek, rsmith. Herald added a subscriber: cfe-commits. The integer promotions apply to bitfields as well, but rather oddly. If you have a bitfield with a lower width than int, then the type of the member expression will be int regardless