[PATCH] D33526: Fix spurious Wunused-lambda-capture warning

Malcolm Parsons via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 2 00:16:39 PDT 2017


malcolm.parsons added inline comments.


================
Comment at: lib/Sema/SemaLambda.cpp:1525-1526
+      if (!CurContext->isDependentContext() && !IsImplicit)
+        if ((IsGenericLambda && !From.isNonODRUsed()) ||
+            (!IsGenericLambda && !From.isODRUsed()))
+          DiagnoseUnusedLambdaCapture(From);
----------------
This would be better using a ternary operator.
Add a comment too.


Repository:
  rL LLVM

https://reviews.llvm.org/D33526





More information about the cfe-commits mailing list