================
@@ -199,15 +204,62 @@ static const FunctionDecl *resolveMocks(const
FunctionDecl *Func) {
return Func;
}
+namespace {
+
+enum class InitListKind {
+ None,
+ Anonymous,
+ Typed,
+};
+
+} // namespace
+
+static InitListKind getInitListKind(const Expr *Arg) {
+ Arg = Arg->IgnoreImplicit();
+
+ // Peel std::initializer_list wrappers until we reach the underlying
+ // list-initialization expression.
+ while (const auto *StdInit = dyn_cast<CXXStdInitializerListExpr>(Arg))
----------------
unterumarmung wrote:
You're right. I actually found a bug in the check, exploring possible options:
it was missing a diagnostic for explicitly spelled `std::initializer_list` in
the "typed" mode
https://github.com/llvm/llvm-project/pull/180408
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits