Skip to content
Commit 8de51375 authored by Shafik Yaghmour's avatar Shafik Yaghmour
Browse files

[Clang] Tighten restrictions on enum out of range diagnostic to avoid constant initialization

The restrictions added in D131704 were not sufficient to avoid all non-constant
expression contexts. In particular constant initialization cases.

We need to check EvaluatingDecl to detect if the variable we are initializing is
constexpr or not.

At this point it looks like this is the remaining case affecting various projects
with this diagnostic.

Differential Revision: https://reviews.llvm.org/D131874
parent aa41fe66
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment