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

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 6 11:59:50 PDT 2026


================
@@ -2101,6 +2101,20 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
   GoogleStyle.IncludeStyle.IncludeIsMainRegex = "([-_](test|unittest))?$";
   GoogleStyle.IndentCaseLabels = true;
   GoogleStyle.KeepEmptyLines.AtStartOfBlock = false;
+
+  GoogleStyle.Macros.push_back("ASSIGN_OR_RETURN(a, b)=a = (b)");
----------------
HazardyKnusperkeks wrote:

Please use one assignment, not a sequence of push_backs.

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


More information about the cfe-commits mailing list