llvm-project/clang/lib
Alexey Bataev bef6aa6ea9 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.

llvm-svn: 284229
2016-10-14 12:43:59 +00:00
..
ARCMigrate [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
AST Fix bogus assert breaking modules self-host. 2016-10-14 02:35:11 +00:00
ASTMatchers [AST] Convert Marshallers to use unique_ptr. 2016-10-10 16:26:40 +00:00
Analysis [analyzer] Remove superquadratic behaviour from DataflowWorklist 2016-10-13 21:31:46 +00:00
Basic Implement MS _BitScan intrinsics 2016-10-12 22:01:05 +00:00
CodeGen Add 64-bit MS _Interlocked functions as builtins again 2016-10-13 22:35:07 +00:00
Driver Pass -ffunction-sections/-fdata-sections along to gold-plugin 2016-10-13 18:05:53 +00:00
Edit [OpenCL] Generate opaque type for sampler_t and function call for the initializer 2016-07-28 19:26:30 +00:00
Format Removed duplicate header include 2016-10-14 11:48:10 +00:00
Frontend Reapply [Driver][Diagnostics] Make 'show option names' default for driver warnings 2016-10-11 18:21:26 +00:00
FrontendTool C++ Modules TS: add frontend support for building pcm files from module 2016-08-26 00:14:38 +00:00
Headers Add 64-bit MS _Interlocked functions as builtins again 2016-10-13 22:35:07 +00:00
Index Visit lambda capture inits from RecursiveASTVisitor::TraverseLambdaCapture(). 2016-08-17 14:59:53 +00:00
Lex Turn FileManager DirectoryEntry::Name from raw pointer to StringRef (NFC) 2016-10-11 07:31:29 +00:00
Parse [CUDA] Add #pragma clang force_cuda_host_device_{begin,end} pragmas. 2016-10-08 22:15:58 +00:00
Rewrite [analyzer] Re-apply r283092, attempt no.4, chunk no.4 (last) 2016-10-07 19:25:10 +00:00
Sema Fix for PR30632: Name mangling issue. 2016-10-14 12:43:59 +00:00
Serialization Reinstate r281429, reverted in r281452, with a fix for its mishandling of 2016-10-13 23:04:14 +00:00
StaticAnalyzer [analyzer] Link libStaticAnalyzerCheckers to libASTMatchers. 2016-10-13 11:41:12 +00:00
Tooling Deduplicate sets of replacements by file names. 2016-10-14 09:32:06 +00:00
CMakeLists.txt