george.burgess.iv created this revision.
george.burgess.iv added a reviewer: rtrieu.
george.burgess.iv added a subscriber: cfe-commits.
Currently, -Wtautological-overlap-compare only emits warnings if the
comparisons are between integer literals and variables. This patch adds support
for compari
aaron.ballman added a subscriber: aaron.ballman.
aaron.ballman added a comment.
Thank you for working on this -- I think it's a good cleanup and feature-add! I
have a few minor comments, but generally LGTM. You should wait for an okay from
Richard, however.
Comment at: lib/Ana
george.burgess.iv updated this revision to Diff 35744.
george.burgess.iv marked an inline comment as done.
george.burgess.iv added a comment.
Addressed all feedback
http://reviews.llvm.org/D13157
Files:
lib/Analysis/CFG.cpp
test/Sema/warn-overlap.c
Index: test/Sema/warn-overlap.c
=
george.burgess.iv added inline comments.
Comment at: lib/Analysis/CFG.cpp:54
@@ +53,3 @@
+auto *DR = dyn_cast(E->IgnoreParenImpCasts());
+if (DR == nullptr)
+ return nullptr;
aaron.ballman wrote:
> Please don't compare a pointer against nullptr with a
aaron.ballman accepted this revision.
aaron.ballman added a reviewer: aaron.ballman.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
Thanks, I think this looks good (pending confirmation from Richard).
~Aaron
http://reviews.llvm.org/D13157
rtrieu accepted this revision.
rtrieu added a comment.
Fix the comments, then it should be ready to commit.
Comment at: lib/Analysis/CFG.cpp:49
@@ +48,3 @@
+tryNormalizeBinaryOperator(const BinaryOperator *B) {
+ auto TryTransformToIntOrEnumConstant = [](const Expr *E) -> const
george.burgess.iv closed this revision.
george.burgess.iv marked 4 inline comments as done.
george.burgess.iv added a comment.
Changed code to address all feedback + committed as r249053. Thanks for the
reviews!
Comment at: lib/Analysis/CFG.cpp:49
@@ +48,3 @@
+tryNormalizeBinar
On Thu, Oct 1, 2015 at 2:50 PM, George Burgess IV
wrote:
> george.burgess.iv closed this revision.
> george.burgess.iv marked 4 inline comments as done.
> george.burgess.iv added a comment.
>
> Changed code to address all feedback + committed as r249053. Thanks for the
> reviews!
>
>
> ==
rtrieu added a comment.
Next time, add
> Differential Revision:
to your commit and Phabricator will close the diff automatically.
http://llvm.org/docs/Phabricator.html
Comment at: lib/Analysis/CFG.cpp:99-104
@@ +98,8 @@
+ // Currently we're only given EnumConstantDecls or
On Thu, Oct 1, 2015 at 3:01 PM, Richard Trieu wrote:
> rtrieu added a comment.
>
> Next time, add
>
>> Differential Revision:
>
>
> to your commit and Phabricator will close the diff automatically.
>
> http://llvm.org/docs/Phabricator.html
>
>
>
> Comment at: lib/Analysis/CFG.cpp
> Next time, add Differential Revision: to your commit and
Phabricator will close the diff automatically.
Ooh, shiny. Thanks for letting me know!
> Doubling the expense for assert builds so that we get a slightly better
stack trace in the event our assumptions are wrong doesn't seem like a good
I'm in favor of keeping the asserts around. Several times, I've seen Clang
crashers than languish in the bug tracker with an assert in a generic
casting function. And no one fixes it until someone pokes at the backtrace
to find the source of the bad pointer, at which point it gets fixed quickly.
On Thu, Oct 1, 2015 at 5:18 PM, Richard Trieu wrote:
> I'm in favor of keeping the asserts around. Several times, I've seen Clang
> crashers than languish in the bug tracker with an assert in a generic
> casting function. And no one fixes it until someone pokes at the backtrace
> to find the sou
On Fri, Oct 2, 2015 at 6:10 AM, Aaron Ballman via cfe-commits <
cfe-commits@lists.llvm.org> wrote:
> On Thu, Oct 1, 2015 at 5:18 PM, Richard Trieu wrote:
> > I'm in favor of keeping the asserts around. Several times, I've seen
> Clang
> > crashers than languish in the bug tracker with an assert
14 matches
Mail list logo