| 62 | } |
| 63 | |
| 64 | absl::optional<Expr> CheckInvalidArgs(MacroExprFactory &factory, |
| 65 | absl::string_view macro, |
| 66 | absl::Span<const Expr> arguments) { |
| 67 | for (const auto &argument : arguments) { |
| 68 | if (!IsValidArgType(argument)) { |
| 69 | return factory.ReportErrorAt( |
| 70 | argument, |
| 71 | absl::StrCat(macro, " simple literal arguments must be numeric")); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | return absl::nullopt; |
| 76 | } |
| 77 | |
| 78 | bool IsListLiteralWithValidArgs(const Expr &arg) { |
| 79 | if (const auto *list_expr = arg.has_list_expr() ? &arg.list_expr() : nullptr; |
no test coverage detected