Go to file
Jonas Toth c361e0d627 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
2018-12-05 08:29:56 +00:00
clang [asan] Add clang flag -fsanitize-address-use-odr-indicator 2018-12-05 01:44:31 +00:00
clang-tools-extra Fix a false positive in misplaced-widening-cast 2018-12-05 08:29:56 +00:00
compiler-rt [XRay] Use uptr instead of uintptr_t 2018-12-05 07:14:06 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc travis: Add cmake build 2018-11-27 16:07:21 +00:00
libcxx [libcxx] Always enable availability in the lit test suite. 2018-12-04 19:31:08 +00:00
libcxxabi [libcxx] Remove bad_array_length 2018-11-29 19:44:57 +00:00
libunwind [CMake] Passthrough CFLAGS when checking the compiler-rt path 2018-11-14 00:09:26 +00:00
lld [ELF] Simplify getSectionPiece 2018-12-04 22:25:05 +00:00
lldb gdb-remote: use elaborated type specifier for `Module` 2018-12-05 04:04:14 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [X86] Remove -costmodel-reduxcost=true from the experimental vector reduction intrinsic tests as it appears to be unnecessary. NFC 2018-12-05 07:56:50 +00:00
openmp [OpenMP][libomptarget] Flush intermediate values during team reduction 2018-12-03 15:21:49 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [CMake] Fix generation of exported targets in build directory 2018-11-06 15:18:17 +00:00
README.md Update the project name in README.md 2018-10-19 00:03:01 +00:00

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.