Daniel Carvalho has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/43329 )

Change subject: util: Add verifier for opening braces of unions
......................................................................

util: Add verifier for opening braces of unions

Make sure that opening braces of unions are not declared
in the same line of the union name.

This does not work for multi-line unions.

Change-Id: Ieed6f974aec4b435b76195b1a05453da912f7450
Signed-off-by: Daniel R. Carvalho <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43329
Reviewed-by: Bobby R. Bruce <[email protected]>
Maintainer: Bobby R. Bruce <[email protected]>
Tested-by: kokoro <[email protected]>
---
M util/style/verifiers.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/util/style/verifiers.py b/util/style/verifiers.py
index 6cca382..c5beb02 100644
--- a/util/style/verifiers.py
+++ b/util/style/verifiers.py
@@ -470,7 +470,7 @@
     test_name = 'class opening brace position'
     opt_name = 'classbrace'

-    regex = re.compile(r'\A(\s*)((class|struct|enum)\s+[A-Z].*\S)\s*\{')
+ regex = re.compile(r'\A(\s*)((class|struct|enum| union)\s+[A-Z].*\S)\s*\{')

     def check_line(self, line, **kwargs):
         return self.regex.search(line) == None

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/43329
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ieed6f974aec4b435b76195b1a05453da912f7450
Gerrit-Change-Number: 43329
Gerrit-PatchSet: 4
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-CC: Giacomo Travaglini <[email protected]>
Gerrit-CC: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to