rsmith added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:3147-3149
+def warn_impcast_literal_to_bool : Warning<
+ "implicit conversion from %0 to %1; will always evaluate to "
+ "'%select{false|true}2'">, InGroup;
Warning groups are
aaron.ballman added a comment.
Post-holiday ping.
https://reviews.llvm.org/D15935
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
aaron.ballman updated this revision to Diff 124308.
aaron.ballman added a comment.
Ping. Rebased on ToT.
https://reviews.llvm.org/D15935
Files:
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaChecking.cpp
test/Analysis/casts.c
test/CXX/d
aaron.ballman marked 2 inline comments as done.
aaron.ballman added a comment.
Ping
http://reviews.llvm.org/D15935
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
aaron.ballman added inline comments.
Comment at: lib/Sema/SemaChecking.cpp:6985
@@ -6984,6 +6984,3 @@
SmallString<16> PrettyTargetValue;
- if (T->isSpecificBuiltinType(BuiltinType::Bool))
-PrettyTargetValue = Value.isZero() ? "false" : "true";
- else
-IntegerValue.toS
manmanren added a subscriber: manmanren.
manmanren added a comment.
Thanks for working on this. This looks good to me overall, but I am not the
expert on Sema :]
Cheers,
Manman
Comment at: lib/Sema/SemaChecking.cpp:6985
@@ -6984,6 +6984,3 @@
SmallString<16> PrettyTargetValu
aaron.ballman added a comment.
Ping
http://reviews.llvm.org/D15935
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
aaron.ballman created this revision.
aaron.ballman added reviewers: rsmith, dblaikie.
aaron.ballman added a subscriber: cfe-commits.
This patch improves the literal conversion diagnostics where the target type is
a Boolean by handling literals more consistently, and telling the user whether
the