inclyc added inline comments.
================ Comment at: clang/lib/Parse/ParseExprCXX.cpp:3783 - if (Arity && Args.size() != Arity) { - Diag(EndLoc, diag::err_type_trait_arity) ---------------- Before this patch, we check the `Arity` here, so using type traits with unexpected number of arguments does not crash clang See https://godbolt.org/z/afGxvqdEh ================ Comment at: clang/lib/Sema/SemaExprCXX.cpp:5433 SourceLocation RParenLoc) { + if (!CheckTypeTraitArity(getTypeTraitArity(Kind), KWLoc, Args.size())) + return ExprError(); ---------------- Moves to here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131423/new/ https://reviews.llvm.org/D131423 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits