https://bugs.kde.org/show_bug.cgi?id=471995

Igor Kushnir <igor...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/kdev
                   |                            |elop/kdevelop/-/commit/ede1
                   |                            |cf4ad6f945349060db9446c489e
                   |                            |3fd34dec4
   Version Fixed In|                            |5.12.230800

--- Comment #4 from Igor Kushnir <igor...@gmail.com> ---
Git commit ede1cf4ad6f945349060db9446c489e3fd34dec4 by Igor Kushnir.
Committed on 07/07/2023 at 10:58.
Pushed by igorkushnir into branch 'master'.

Don't cast out-of-enum-range -1 to CommonIntegralTypes

This fixes the following Clang 16 compilation error:
kdevelop/plugins/clang/duchain/cursorkindtraits.h:217:7: error: integer value
-1 is outside the valid range of values [0, 255] for the enumeration type
'CommonIntegralTypes' [-Wenum-constexpr-conversion]
    : static_cast<IntegralType::CommonIntegralTypes>(-1);

Quote from https://github.com/llvm/llvm-project/issues/59036 :
    The -Wenum-constexpr-conversion warning was created to account for
    the fact that casting integers to enums outside of the valid range
    of the enum is UB in C++17. Constant expressions invoking UB lead to
    an ill-formed program.
FIXED-IN: 5.12.230800

M  +2    -1    kdevplatform/language/duchain/types/integraltype.h
M  +1    -1    plugins/clang/duchain/builder.cpp
M  +1    -1    plugins/clang/duchain/cursorkindtraits.h

https://invent.kde.org/kdevelop/kdevelop/-/commit/ede1cf4ad6f945349060db9446c489e3fd34dec4

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to