Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a false positive in misplaced-widening-cast
Summary: bugprone-misplaced-widening-cast check used to give a false warning to the following example. enum DaysEnum{ MON = 0, TUE = 1 }; day = (DaysEnum)(day + 1); //warning: either cast from 'int' to 'DaysEnum' is ineffective... But i think int to enum cast is not widening neither ineffective. Patch by dkrupp. Reviewers: JonasToth, alexfh Reviewed By: alexfh Subscribers: rnkovacs, Szelethus, gamesh411, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D55255 llvm-svn: 348341
- Loading branch information