diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-10-14 12:43:59 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-10-14 12:43:59 +0000 |
commit | bef6aa6ea99b19cbc570a712a4f243398ad7d014 (patch) | |
tree | ae038a4f3a52ea27fdd8b71fe9243a0b61dbea8f /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | |
parent | 735f3a26be47c38404608d62eb8c4ace9555e085 (diff) | |
download | llvm-bef6aa6ea99b19cbc570a712a4f243398ad7d014.zip llvm-bef6aa6ea99b19cbc570a712a4f243398ad7d014.tar.gz llvm-bef6aa6ea99b19cbc570a712a4f243398ad7d014.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions