Unverified Commit 7b7d2dd7 authored by David Spickett's avatar David Spickett Committed by GitHub
Browse files

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

Compiling with -DCMAKE_CXX_STANDARD=20 produces 228 warnings from this
file due to:
```
LVOptions.h:515:16: warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture]
```

So I've changed these to explicitly list the captures, including `this`.

As llvm requires at least c++17, I think we could use `[=, *this]`
instead. However when I did so I got a lot of errors about const. So on
balance, explicitly listing the captures seems better than adding some
kind of const cast to each one.

These and other warnings can be seen on the c++20 buildbot
https://lab.llvm.org/buildbot/#/builders/249.
parent e0e21609
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment