thakis added inline comments.
Comment at: test/SemaCXX/warn-msvc-enum-bitfield.cpp:12
@@ +11,3 @@
+ s.e2 = E2;
+ s.f2 = F2;
> thakis wrote:
> > Shouldn't this be the version that warns? The assignment with E1 assigns 0
> > which is portable, but this assigns 1 which overflows, right?
> e2 is not a bitfield :) So this code is fine.
> And we should warn on all assignments, since any assigned value could
> potentially be incorrect. Also, most assignments are not static so we don't
> always have that information :)
Do you have any data on false positive rate when we just always warn
unconditionally? i.e. did you build some large-ish open-source program (clang,
chromium, firefox, ...) and is the true positive / false positive rate ok? (we
have some problems with "always warn" with other enum warning which we
currently always have to disable, e.g.
To land, you need to `svn commit` or ask someone with commit access to do that
for you -- llvm doesn't have a commit queue.
cfe-commits mailing list