Home | History | Annotate | Download | only in Frontend
      1 // RUN: %clang -emit-llvm -S -o %t1.ll -x c++ - < %s
      2 // RUN: %clang -fno-delayed-template-parsing -emit-ast -o %t.ast %s
      3 // RUN: %clang -emit-llvm -S -o %t2.ll -x ast - < %t.ast
      4 // RUN: diff %t1.ll %t2.ll
      5 
      6 // http://llvm.org/bugs/show_bug.cgi?id=15377
      7 template<typename T>
      8 struct S {
      9     T *mf();
     10 };
     11 template<typename T>
     12 T *S<T>::mf() {
     13     // warning: control reaches end of non-void function [-Wreturn-type]
     14 }
     15 
     16 void f() {
     17     S<int>().mf();
     18 }
     19 
     20 int main() {
     21   return 0;
     22 }
     23