aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Srivastava <sunil_srivastava@playstation.sony.com>2019-06-05 00:46:45 +0000
committerSunil Srivastava <sunil_srivastava@playstation.sony.com>2019-06-05 00:46:45 +0000
commitb18ebcb15e100e9384edd3da7b5819e64fa57f6d (patch)
treef851a987dedbdc77829d00b53edf53d6b396c914
parentc79e9b9f75512e75c3241b08ec78f78d8fc710af (diff)
Made lambda test more robust.
The test used a lambda that could be optimized out as a constexpr lambda in the C++17 mode, leading to a test faiure due to a missing symbol. This patch avoids that. git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@362564 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-xABI-Testsuite/test/mangling/lambdas.xpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ABI-Testsuite/test/mangling/lambdas.xpp b/ABI-Testsuite/test/mangling/lambdas.xpp
index 10d4b355..315d3ce2 100755
--- a/ABI-Testsuite/test/mangling/lambdas.xpp
+++ b/ABI-Testsuite/test/mangling/lambdas.xpp
@@ -49,5 +49,6 @@ void call_foo4() {
template<typename T> struct S1 {
static int x;
};
-template<typename T> int S1<T>::x = []{ return 1;}();
+int extVar;
+template<typename T> int S1<T>::x = []{ return extVar;}();
template int S1<int>::x;