[PATCH] D36670: misc-misplaced-widening-cast: fix assertion

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 17 07:55:08 PDT 2017


alexfh accepted this revision.
alexfh added a comment.

LG. Thank you for the fix!



================
Comment at: test/clang-tidy/misc-misplaced-widening-cast-explicit-only.cpp:63
+  enum Type {};
+  static char *m_fn1() { char p = (Type)(&p - m_fn1()); }
+};
----------------
xazax.hun wrote:
> Isn't this testcase a bit overcomplicated to demonstrate the issue?
It's what creduce spat out a few hours after I had run it on a pretty large preprocessed source.  I wouldn't spend more time simplifying the case ;)


Repository:
  rL LLVM

https://reviews.llvm.org/D36670





More information about the cfe-commits mailing list