<html>
<head>
<base href="http://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 --- - -Wunsequenced false positive for code involving lambdas"
href="http://llvm.org/bugs/show_bug.cgi?id=15733">15733</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-Wunsequenced false positive for code involving lambdas
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>Static Analyzer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>kremenek@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zeratul976@hotmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>When compiling the following code with -Wall:
struct A
{
A() {};
template <typename T>
int operator=(T) const;
};
struct B
{
B foo(int);
};
template <typename T>
void waldo()
{
A a;
B b;
b.foo(a = []{}).foo(a = []{});
}
clang produces the following warning:
test.cpp:20:13: warning: multiple unsequenced modifications to 'a'
[-Wunsequenced]
b.foo(a = []{}).foo(a = []{});
^ ~
This is a false positive because the assignment operator that's supposedly
modifying 'a' is const, and thus does no such thing.</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>