[PATCH] D37572: [clang-tidy] SuspiciousEnumUsageCheck bugfix
Alexander Kornienko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 8 10:44:47 PDT 2017
alexfh added inline comments.
================
Comment at: test/clang-tidy/misc-suspicious-enum-usage.cpp:122
+struct a<f<ad, ae, af>> {
+ enum { ah = ad::m,
+ ai = ae::m,
----------------
alexfh wrote:
> aaron.ballman wrote:
> > alexfh wrote:
> > > aaron.ballman wrote:
> > > > This seems like a lot of complicated code for the test case -- can this be reduced further?
> > > This is the best creduce could do. It should be possible to make this much shorter, but I wouldn't spend too much time on that.
> > I'd appreciate the time spent because this is an almost-unintelligible test for anyone reading it -- it's hard to understand what's going on there.
> namespace PR34400 {
> enum { E1 = 0 };
> enum { E2 = -1 };
>
> enum { l = E1 | E2 };
> }
>
This might not cover both code paths affected by the bug. But it should be easy to construct a case for the second one.
https://reviews.llvm.org/D37572
More information about the cfe-commits
mailing list