summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/test/Profile/cxx-static.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Profile/cxx-static.cpp b/clang/test/Profile/cxx-static.cpp
new file mode 100644
index 00000000000..39ace1ecb4d
--- /dev/null
+++ b/clang/test/Profile/cxx-static.cpp
@@ -0,0 +1,11 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang -target i386-unknown-linux -std=c++11 -o %t.o -c -no-integrated-as -fprofile-instr-generate %s
+
+__attribute__((noinline)) static int bar() { return 1; }
+
+int foo(int a, int b) {
+ auto Func = [](int a, int b) { return a > b; };
+
+ return Func(a, b) + bar();
+}
+
OpenPOWER on IntegriCloud