diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-09-22 04:25:05 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-09-22 04:25:05 +0000 |
| commit | c95d2c5dda635af5edfc7a6634605b99e3bcecd3 (patch) | |
| tree | 7c52f5ea2e3ca8059c850f87769e8b2fdf9eb04a /clang/test/SemaCXX/vartemplate-lambda.cpp | |
| parent | 83e2838d03e17e3ee5b73ab91c47660e4a8daf3c (diff) | |
| download | bcm5719-llvm-c95d2c5dda635af5edfc7a6634605b99e3bcecd3.tar.gz bcm5719-llvm-c95d2c5dda635af5edfc7a6634605b99e3bcecd3.zip | |
Give external linkage and mangling to lambdas inside inline variables and variable templates.
This implements the proposed approach in https://github.com/itanium-cxx-abi/cxx-abi/issues/33
This reinstates r313827, reverted in r313856, with a fix for the 'out-of-bounds
enumeration value' ubsan error in that change.
llvm-svn: 313955
Diffstat (limited to 'clang/test/SemaCXX/vartemplate-lambda.cpp')
| -rw-r--r-- | clang/test/SemaCXX/vartemplate-lambda.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/vartemplate-lambda.cpp b/clang/test/SemaCXX/vartemplate-lambda.cpp index 5b91e232e3a..6744968bcc4 100644 --- a/clang/test/SemaCXX/vartemplate-lambda.cpp +++ b/clang/test/SemaCXX/vartemplate-lambda.cpp @@ -8,7 +8,7 @@ template<typename T> auto v1 = [](int a = T(1)) { return a; }(); struct S { template<class T> - static constexpr T t = [](int f = T(7)){return f;}(); // expected-error{{constexpr variable 't<int>' must be initialized by a constant expression}} expected-error{{a lambda expression may not appear inside of a constant expression}} expected-note{{cannot be used in a constant expression}} + static constexpr T t = [](int f = T(7)){return f;}(); // expected-error{{constexpr variable 't<int>' must be initialized by a constant expression}} expected-note{{cannot be used in a constant expression}} }; template <typename X> |

