[clang] [Clang] Fix UB in #131515 (PR #132091)

Florian Mayer via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 19 13:19:36 PDT 2025


================
@@ -1681,7 +1681,7 @@ std::optional<unsigned> Sema::GetDecompositionElementCount(QualType T,
   llvm::APSInt TupleSize(Ctx.getTypeSize(Ctx.getSizeType()));
   switch (isTupleLike(*this, Loc, T, TupleSize)) {
   case IsTupleLike::Error:
-    return {};
+    return std::nullopt;
----------------
fmayer wrote:

how are those changes related to the other one / the commit message?

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


More information about the cfe-commits mailing list