aaron.ballman added inline comments.

================
Comment at: lib/Sema/SemaLambda.cpp:1458
+
+  return false;
+}
----------------
I think this is missing one more case: capturing a `volatile` variable by copy 
does have a side effect in that the variable is read when the capture occurs. 
e.g., this should not diagnose either:
```
void f(volatile int v) {
  [v]{}();
}
```


https://reviews.llvm.org/D30327



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to