blob: 4bddbe1372a095b8cae16325fd1da066e8470065 [file] [log] [blame]
Argyrios Kyrtzidis62ba4ba2013-03-18 22:55:24 +00001// RUN: %clang -emit-llvm -S -o %t1.ll -x c++ - < %s
Aaron Ballman7b793842013-03-21 19:38:59 +00002// RUN: %clang -fno-delayed-template-parsing -emit-ast -o %t.ast %s
Argyrios Kyrtzidis62ba4ba2013-03-18 22:55:24 +00003// 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
7template<typename T>
8struct S {
9 T *mf();
10};
11template<typename T>
12T *S<T>::mf() {
13 // warning: control reaches end of non-void function [-Wreturn-type]
14}
15
16void f() {
17 S<int>().mf();
18}
19
20int main() {
21 return 0;
22}