-
- Downloads
Merging r284229:
------------------------------------------------------------------------ r284229 | abataev | 2016-10-14 12:43:59 +0000 (Fri, 14 Oct 2016) | 37 lines Fix for PR30632: Name mangling issue. There was a bug in the implementation of captured statements. If it has a lambda expression in it and the same lambda expression is used outside the captured region, clang produced an error: ``` error: definition with same mangled name as another definition ``` Here is an example: ``` struct A { template <typename L> void g(const L&) { } }; template<typename T> void f() { { A().g([](){}); } A().g([](){}); } int main() { f<void>(); } ``` Error report: ``` main.cpp:3:10: error: definition with same mangled name as another definition void g(const L&) { } ^ main.cpp:3:10: note: previous definition is here ``` Patch fixes this bug. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_39@286970 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- lib/Sema/SemaLambda.cpp 4 additions, 1 deletionlib/Sema/SemaLambda.cpp
- test/CodeGenCXX/captured-statements.cpp 1 addition, 0 deletionstest/CodeGenCXX/captured-statements.cpp
- test/OpenMP/for_lastprivate_codegen.cpp 6 additions, 3 deletionstest/OpenMP/for_lastprivate_codegen.cpp
- test/OpenMP/target_map_codegen.cpp 3 additions, 1 deletiontest/OpenMP/target_map_codegen.cpp
Loading
Please register or sign in to comment