[llvm] [llvm] Support building with c++23 (PR #154372)
Kyle Krüger via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 20 00:46:04 PDT 2025
================
@@ -615,7 +623,7 @@ bool SwitchMatcher::addMatcher(Matcher &Candidate) {
}
void SwitchMatcher::finalize() {
- assert(Condition == nullptr && "Already finalized");
+ assert(Condition.get() == nullptr && "Already finalized");
----------------
kykrueger wrote:
I added it because accessing an uninitialized unique_ptr seems to be undefined, meanwhile calling its getter is defined behavior to return a nullptr.
The code does indeed compile when leaving these get calls out, but I'm not sure if we can rely on it.
https://github.com/llvm/llvm-project/pull/154372
More information about the llvm-commits
mailing list