Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
a72cc78e
Commit
a72cc78e
authored
Jan 22, 2014
by
James Zern
Committed by
Gerrit Code Review
Jan 22, 2014
Browse files
Merge "cpplint: restore runtime/sizeof"
parents
e0ec51d3
3fcaf97f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/cpplint.py
View file @
a72cc78e
...
...
@@ -181,6 +181,7 @@ _ERROR_CATEGORIES = [
'runtime/printf'
,
'runtime/printf_format'
,
'runtime/references'
,
'runtime/sizeof'
,
'runtime/string'
,
'runtime/threadsafe_fn'
,
'runtime/vlog'
,
...
...
@@ -4154,10 +4155,12 @@ def CheckCStyleCast(filename, linenum, line, raw_line, cast_type, pattern,
if
not
match
:
return
False
#
Exclude lines with sizeof, since sizeof looks like a cast.
#
e.g., sizeof(int)
sizeof_match
=
Match
(
r
'.*sizeof\s*$'
,
line
[
0
:
match
.
start
(
1
)
-
1
])
if
sizeof_match
:
return
False
error
(
filename
,
linenum
,
'runtime/sizeof'
,
1
,
'Using sizeof(type). Use sizeof(varname) instead if possible'
)
return
True
# operator++(int) and operator--(int)
if
(
line
[
0
:
match
.
start
(
1
)
-
1
].
endswith
(
' operator++'
)
or
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment