[clang] [Format] Configure ASSIGN_OR_RETURN macros for Google style (PR #169037)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 16 08:11:16 PST 2026


================
@@ -961,14 +968,21 @@ TEST(ConfigParseTest, ParsesConfiguration) {
               StatementAttributeLikeMacros,
               std::vector<std::string>({"emit", "Q_EMIT"}));
 
+  Style.Macros.clear();
+  CHECK_PARSE("{ BasedOnStyle: LLVM, Macros: [foo]}", Macros,
+              std::vector<std::string>({"foo"}));
+  CHECK_PARSE_THAT(
+      "BasedOnStyle: Google", Macros,
+      testing::ElementsAre(testing::StartsWith("ASSIGN_OR_RETURN(a, b)="),
+                           testing::StartsWith("ASSIGN_OR_RETURN(a, b, c)=")));
----------------
ilya-biryukov wrote:

Done.

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


More information about the cfe-commits mailing list