<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Merge r284229 into the 3.9 branch"
   href="https://llvm.org/bugs/show_bug.cgi?id=30853">30853</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Merge r284229 into the 3.9 branch
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>OpenMP
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Clang Compiler Support
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>howarth.mailing.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I would like to propose merging the change...

r284229 | abataev | 2016-10-14 08:43:59 -0400 (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.

to 3.9 branch for the 3.9.1 release</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>