[llvm] [llvm][DebugInfo] Fix c++20 warnings in LVOptions.h (PR #79585)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 10:18:50 PST 2024


dwblaikie wrote:

I'd generally suggest if a lambda doesn't escape its scope, especially when they're short/simple like this (you can see the whole lambda and its call on a page) we should use `[&]` by default to keep things simple.

Also, it's a bit quirky to define lambdas for a single call a few lines later - perhaps this code would be more clear if it were written without lambdas, and with a possible series of if statements?

https://github.com/llvm/llvm-project/pull/79585


More information about the llvm-commits mailing list