[PATCH] D131528: [Clang] Restrict non fixed enum to a value outside the range of the enumeration values warning to context requiring a constant expression

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 12 00:43:21 PDT 2022


mstorsjo added a comment.

In D131528#3716876 <https://reviews.llvm.org/D131528#3716876>, @shafik wrote:

> In D131528#3715841 <https://reviews.llvm.org/D131528#3715841>, @thakis wrote:
>
>> We're also still seeing the diag fire after this: https://ci.chromium.org/p/chromium/builders/ci/ToTLinux
>>
>> (And we cleaned up our codebase back when it was still an error.)
>>
>> Our bots have been red since the change to turn this into a warning landed.
>
> Apologies, my condition was not strict enough, I have put up D131704 <https://reviews.llvm.org/D131704>

Unfortunately, even after D131704 <https://reviews.llvm.org/D131704> (with both commits), I'm still hitting a couple cases that weren't an error before this. With https://martin.st/temp/qt-jit-enum.cpp and https://martin.st/temp/protobuf-wire-format.cpp, built with `clang -target i686-w64-mingw32 -c qt-jit-enum.cpp -std=c++17 -Wno-user-defined-literals -Wno-ignored-attributes` (and same for the other file, although `-std=c++17` can be omitted for the protobuf source) I'm still hitting errors for things that weren't even warned about before.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131528/new/

https://reviews.llvm.org/D131528



More information about the cfe-commits mailing list