mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
[cpplint] Fix regexp for class decorators
This also allows digits in class decorators, to also match macros like V8_EXPORT_PRIVATE. Note: I uploaded a pull request for the (previous) upstream at https://github.com/google/styleguide/pull/422, but then was told that that repository is not maintained any more. R=jochen@chromium.org Bug: chromium:916550 Change-Id: I24cd1829b794b296be8e0c2829271c746751ee1c Reviewed-on: https://chromium-review.googlesource.com/c/1383472 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
This commit is contained in:
committed by
Commit Bot
parent
a3eb0bb167
commit
2cc6e25536
2
cpplint.py
vendored
2
cpplint.py
vendored
@@ -2530,7 +2530,7 @@ class NestingState(object):
|
||||
# };
|
||||
class_decl_match = Match(
|
||||
r'^(\s*(?:template\s*<[\w\s<>,:]*>\s*)?'
|
||||
r'(class|struct)\s+(?:[A-Z_]+\s+)*(\w+(?:::\w+)*))'
|
||||
r'(class|struct)\s+(?:[A-Z0-9_]+\s+)*(\w+(?:::\w+)*))'
|
||||
r'(.*)$', line)
|
||||
if (class_decl_match and
|
||||
(not self.stack or self.stack[-1].open_parentheses == 0)):
|
||||
|
||||
Reference in New Issue
Block a user