================
@@ -1099,14 +1099,27 @@ TEST(ConfigParseTest, ParsesConfiguration) {
StatementAttributeLikeMacros,
std::vector<std::string>({"emit", "Q_EMIT"}));
+ Style.Macros.clear();
+ CHECK_PARSE("{Macros: [foo]}", Macros, std::vector<std::string>({"foo"}));
+ std::vector<std::string> GoogleMacros;
+ GoogleMacros.push_back("ASSIGN_OR_RETURN(a, b)=a = (b)");
+ GoogleMacros.push_back("ASSIGN_OR_RETURN(a, b, c)=a = (b); if (x) return c");
+ GoogleMacros.push_back("RETURN_IF_ERROR(expr)=if (x) return expr");
+ GoogleMacros.push_back("ASSERT_OK_AND_ASSIGN(lhs, rexpr)=lhs = (rexpr)");
+ GoogleMacros.push_back("ABSL_ASSIGN_OR_RETURN(a, b)=a = (b)");
+ GoogleMacros.push_back(
+ "ABSL_ASSIGN_OR_RETURN(a, b, c)=a = (b); if (x) return c");
+ GoogleMacros.push_back("ABSL_RETURN_IF_ERROR(expr)=if (x) return expr");
+ GoogleMacros.push_back("ABSL_ASSERT_OK_AND_ASSIGN(lhs, rexpr)=lhs =
(rexpr)");
+ CHECK_PARSE("BasedOnStyle: Google", Macros, GoogleMacros);
----------------
jmr wrote:
Again, modeled directly after
https://github.com/llvm/llvm-project/pull/169037/changes
https://github.com/llvm/llvm-project/pull/200210
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits