brintos

brintos / llvm-project-archived public Read only

0
0
Text · 633 B · fc09e64 Raw
23 lines · cpp
1// RUN: env SDKROOT="/" %clang -Wno-error=return-type -emit-llvm -S -o - -x c++ - < %s | grep -v DIFile > %t1.ll2// RUN: env SDKROOT="/" %clang -Wno-error=return-type -fno-delayed-template-parsing -emit-ast -o %t.ast %s3// RUN: env SDKROOT="/" %clang -Wno-error=return-type -emit-llvm -S -o - -x ast - < %t.ast | grep -v DIFile > %t2.ll4// RUN: diff %t1.ll %t2.ll5 6// http://llvm.org/bugs/show_bug.cgi?id=153777template<typename T>8struct S {9    T *mf();10};11template<typename T>12T *S<T>::mf() {13    // warning: non-void function does not return a value [-Wreturn-type]14}15 16void f() {17    S<int>().mf();18}19 20int main() {21  return 0;22}23