diff --git a/clang/lib/AST/Interp/InterpBuiltin.cpp b/clang/lib/AST/Interp/InterpBuiltin.cpp index 280aa39398c8e..5976d4c3e7131 100644 --- a/clang/lib/AST/Interp/InterpBuiltin.cpp +++ b/clang/lib/AST/Interp/InterpBuiltin.cpp @@ -660,6 +660,7 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const Function *F, S.Stk.push(Boolean::from(S.inConstantContext())); break; case Builtin::BI__builtin_assume: + case Builtin::BI__assume: break; case Builtin::BI__builtin_strcmp: if (!interp__builtin_strcmp(S, OpPC, Frame)) diff --git a/clang/test/AST/Interp/builtins.cpp b/clang/test/AST/Interp/builtins.cpp index 5e2ffe50f3740..06a22b16b2dcb 100644 --- a/clang/test/AST/Interp/builtins.cpp +++ b/clang/test/AST/Interp/builtins.cpp @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -fexperimental-new-constant-interpreter %s -verify -// RUN: %clang_cc1 -fexperimental-new-constant-interpreter %s -S -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -verify=ref %s -Wno-constant-evaluated -// RUN: %clang_cc1 -verify=ref %s -Wno-constant-evaluated %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fexperimental-new-constant-interpreter %s -verify -fms-extensions +// RUN: %clang_cc1 -fexperimental-new-constant-interpreter %s -fms-extensions -S -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -verify=ref %s -Wno-constant-evaluated -fms-extensions +// RUN: %clang_cc1 -verify=ref %s -Wno-constant-evaluated %s -fms-extensions -S -emit-llvm -o - | FileCheck %s // expected-no-diagnostics // ref-no-diagnostics @@ -26,6 +26,8 @@ bool is_this_constant() { constexpr bool assume() { __builtin_assume(true); __builtin_assume(false); + __assume(1); + __assume(false); return true; } static_assert(assume(), "");