r296116 - Made test more target agnostic
Serge Pavlov via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 24 05:15:08 PST 2017
Author: sepavloff
Date: Fri Feb 24 07:15:08 2017
New Revision: 296116
URL: http://llvm.org/viewvc/llvm-project?rev=296116&view=rev
Log:
Made test more target agnostic
Recommits r295975 (Added regression tests), reverted in r295975,
because it did not work on non-X86 targets.
Added:
cfe/trunk/test/SemaCXX/friend3.cpp
Added: cfe/trunk/test/SemaCXX/friend3.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/friend3.cpp?rev=296116&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/friend3.cpp (added)
+++ cfe/trunk/test/SemaCXX/friend3.cpp Fri Feb 24 07:15:08 2017
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -S -triple %itanium_abi_triple -std=c++11 -emit-llvm %s -o - | FileCheck %s
+
+namespace pr8852 {
+void foo();
+struct S {
+ friend void foo() {}
+};
+
+void main() {
+ foo();
+}
+// CHECK: define {{.*}} @_ZN6pr88523fooEv
+}
+
+namespace pr9518 {
+template<typename T>
+struct provide {
+ friend T f() { return T(); }
+};
+
+void g() {
+ void f();
+ provide<void> p;
+ f();
+}
+// CHECK: define {{.*}} @_ZN6pr95181fEv
+}
More information about the cfe-commits
mailing list