1 // RUN: %clang_cc1 -std=c++17 -fms-extensions -triple=x86_64-pc-win32 -verify %s
2 // RUN: %clang_cc1 -std=c++17 -fms-extensions -triple=x86_64-pc-win32 -verify %s -fexperimental-new-constant-interpreter
3 // expected-no-diagnostics
4
5 // PR40395 - ConstantExpr shouldn't cause the template object to infinitely
6 // expand.
7 struct _GUID {};
8 struct __declspec(uuid("{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}")) B {};
9
10 template <const _GUID* piid>
11 struct A {
bazA12 virtual void baz() { A<piid>(); }
13 };
14
f()15 void f() {
16 A<&__uuidof(B)>();
17 }
18