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