Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: .clang-format

Issue 1225333004: Add IPC and Windows message map macro blocks to .clang-format options (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moar macros Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ipc/attachment_broker_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: .clang-format
diff --git a/.clang-format b/.clang-format
index 6fdf1dc888cb67d57d1a6bed866bbbff21e5eca7..27c1b2c90bee85b6d431ae379e579552212771a3 100644
--- a/.clang-format
+++ b/.clang-format
@@ -6,3 +6,24 @@ BasedOnStyle: Chromium
# 'vector<vector<int>>'. ('Auto' means that clang-format will only use
# 'int>>' if the file already contains at least one such instance.)
Standard: Cpp11
+# Make sure code like:
+# IPC_BEGIN_MESSAGE_MAP()
+# IPC_MESSAGE_HANDLER(WidgetHostViewHost_Update, OnUpdate)
+# IPC_END_MESSAGE_MAP()
+# gets correctly indented.
+MacroBlockBegin: "^\
+BEGIN_MSG_MAP|\
+BEGIN_MSG_MAP_EX|\
+BEGIN_SAFE_MSG_MAP_EX|\
+CR_BEGIN_MSG_MAP_EX|\
+IPC_BEGIN_MESSAGE_MAP|\
+IPC_BEGIN_MESSAGE_MAP_WITH_PARAM|\
+IPC_STRUCT_BEGIN|\
+IPC_STRUCT_BEGIN_WITH_PARENT|\
+IPC_STRUCT_TRAITS_BEGIN$"
+MacroBlockEnd: "^\
+CR_END_MSG_MAP|\
+END_MSG_MAP|\
+IPC_END_MESSAGE_MAP|\
+IPC_STRUCT_END|\
+IPC_STRUCT_TRAITS_END$"
« no previous file with comments | « no previous file | ipc/attachment_broker_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698