[InstCombine] Preserve NSW flags for `lshr (mul nuw X, C1), C2 -> mul nuw nsw X,...
[llvm-project.git] / clang / test / SemaTemplate / ext_ms_template_spec.cpp
blobcb303217ea901213d3d03929d49443087514d2ba
1 // RUN: %clang_cc1 -fsyntax-only -fms-extensions -std=c++11 -verify %s
3 namespace A {
5 template <class T>
6 class ClassTemplate; // expected-note {{explicitly specialized declaration is here}}
8 template <class T1, class T2>
9 class ClassTemplatePartial; // expected-note {{explicitly specialized declaration is here}}
11 template <typename T> struct X {
12 struct MemberClass; // expected-note {{explicitly specialized declaration is here}}
13 enum MemberEnumeration; // expected-note {{explicitly specialized declaration is here}} // expected-error {{ISO C++ forbids forward references to 'enum' types}}
18 namespace B {
20 template <>
21 class A::ClassTemplate<int>; // expected-warning {{class template specialization of 'ClassTemplate' not in a namespace enclosing 'A' is a Microsoft extension}}
23 template <class T1>
24 class A::ClassTemplatePartial<T1, T1 *> {}; // expected-warning {{class template partial specialization of 'ClassTemplatePartial' not in a namespace enclosing 'A' is a Microsoft extension}}
26 template <>
27 struct A::X<int>::MemberClass; // expected-warning {{member class specialization of 'MemberClass' not in class 'X' or an enclosing namespace is a Microsoft extension}}
29 template <>
30 enum A::X<int>::MemberEnumeration; // expected-warning {{member enumeration specialization of 'MemberEnumeration' not in class 'X' or an enclosing namespace is a Microsoft extension}} // expected-error {{ISO C++ forbids forward references to 'enum' types}}