1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -verify %s -Wunused-parameter 2*0a6a1f1dSLionel Sambuc 3*0a6a1f1dSLionel Sambuc // PR19303 : Make sure we don't get a unused expression warning for deleted and 4*0a6a1f1dSLionel Sambuc // defaulted functions 5*0a6a1f1dSLionel Sambuc 6*0a6a1f1dSLionel Sambuc // expected-no-diagnostics 7*0a6a1f1dSLionel Sambuc 8*0a6a1f1dSLionel Sambuc class A { 9*0a6a1f1dSLionel Sambuc public: 10*0a6a1f1dSLionel Sambuc int x; 11*0a6a1f1dSLionel Sambuc A() = default; 12*0a6a1f1dSLionel Sambuc ~A() = default; 13*0a6a1f1dSLionel Sambuc A(const A &other) = delete; 14*0a6a1f1dSLionel Sambuc 15*0a6a1f1dSLionel Sambuc template <typename T> SetX(T x)16*0a6a1f1dSLionel Sambuc void SetX(T x) { 17*0a6a1f1dSLionel Sambuc this->x = x; 18*0a6a1f1dSLionel Sambuc }; 19*0a6a1f1dSLionel Sambuc 20*0a6a1f1dSLionel Sambuc void SetX1(int x); 21*0a6a1f1dSLionel Sambuc }; 22*0a6a1f1dSLionel Sambuc 23*0a6a1f1dSLionel Sambuc template <> 24*0a6a1f1dSLionel Sambuc void A::SetX(A x) = delete; 25*0a6a1f1dSLionel Sambuc 26*0a6a1f1dSLionel Sambuc class B { 27*0a6a1f1dSLionel Sambuc public: 28*0a6a1f1dSLionel Sambuc B() = default; 29*0a6a1f1dSLionel Sambuc ~B() = default; 30*0a6a1f1dSLionel Sambuc B(const B &other); 31*0a6a1f1dSLionel Sambuc }; 32*0a6a1f1dSLionel Sambuc 33*0a6a1f1dSLionel Sambuc B::B(const B &other) = default; 34