Home | History | Annotate | Download | only in SemaCXX
      1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -std=c++11 %s
      2 // expected-no-diagnostics
      3 
      4 namespace PR26599 {
      5 template <typename>
      6 struct S;
      7 
      8 struct I {};
      9 
     10 template <typename T>
     11 void *&non_pointer() {
     12   void *&r = S<T>()[I{}];
     13   return r;
     14 }
     15 
     16 template <typename T>
     17 void *&pointer() {
     18   void *&r = S<T>()[nullptr];
     19   return r;
     20 }
     21 }
     22 
     23