llvm-project/clang/test/Sema/eval-info.c
Yaxun (Sam) Liu ded2490494 Workaround for EvalInfo ctor for MSVC 2017
Current EvalInfo ctor causes EnableNewConstInterp to be true even though
it is supposed to be false on MSVC 2017. This is because a virtual function
getLangOpts() is called in member initializer lists, whereas on MSVC
member ctors are called before function virtual function pointers are
initialized.

This patch fixes that.

Differential Revision: https://reviews.llvm.org/D70729
2019-11-26 21:43:29 -05:00

10 lines
237 B
C

// RUN: %clang_cc1 %s -fsyntax-only -triple x86_64-unknown-windows-msvc -verify
// expected-no-diagnostics
// Make sure the new constant interpolator is not enabled unintentionally
// to cause assertion.
typedef enum x {
a = 1,
} x;