[PATCH] D18833: [clang-tidy] Fix infinite loop in MisplacedWideningCastCheck.

Etienne Bergeron via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 6 10:50:05 PDT 2016


etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.

In Release mode, the check was infinite looping over chromium code base.

It seems there is something strange with the creation of the Maps.
I believe the compiler is making some assumption with the implicit conversion from enum <-> int.

By moving the map to a standard switch/cases, we no longer allocate memory and we can keep the same behavior. For a small amount of elements, this is fine.

http://reviews.llvm.org/D18833

Files:
  clang-tidy/misc/MisplacedWideningCastCheck.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18833.52822.patch
Type: text/x-patch
Size: 9794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160406/18417649/attachment.bin>


More information about the cfe-commits mailing list