xref: /minix3/external/bsd/llvm/dist/clang/test/SemaCXX/cxx11-user-defined-literals-unused.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -verify %s -Wunused
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc namespace {
operator ""_x(long double value)4*f4a2713aSLionel Sambuc double operator"" _x(long double value) { return double(value); }
operator ""_ii(long double value)5*f4a2713aSLionel Sambuc int operator"" _ii(long double value) { return int(value); } // expected-warning {{not needed and will not be emitted}}
6*f4a2713aSLionel Sambuc }
7*f4a2713aSLionel Sambuc 
8*f4a2713aSLionel Sambuc namespace rdar13589856 {
value()9*f4a2713aSLionel Sambuc   template<class T> double value() { return 3.2_x; }
valuei()10*f4a2713aSLionel Sambuc   template<class T> int valuei() { return 3.2_ii; }
11*f4a2713aSLionel Sambuc 
get_value()12*f4a2713aSLionel Sambuc   double get_value() { return value<double>(); }
13*f4a2713aSLionel Sambuc }
14