Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
8829d6ab
Commit
8829d6ab
authored
Oct 13, 2021
by
Paul
Browse files
Add rules for RedundantCast
parent
337c5ba1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
cppcheck.rules
cppcheck.rules
+18
-0
No files found.
cppcheck.rules
View file @
8829d6ab
...
@@ -152,6 +152,24 @@
...
@@ -152,6 +152,24 @@
<summary>
Else statement is not necessary.
</summary>
<summary>
Else statement is not necessary.
</summary>
</message>
</message>
</rule>
</rule>
<rule>
<tokenlist>
normal
</tokenlist>
<pattern>
<![CDATA[((?:(?:\w+|<|>|::) )*(?:\w+|>)(?: &|\*)*) (\w) ; \2 = static_cast < \1 > (\([^()]*(?-1)*[^()]*\)) ;]]>
</pattern>
<message>
<id>
RedundantCast
</id>
<severity>
style
</severity>
<summary>
Static cast is redundant.
</summary>
</message>
</rule>
<rule>
<tokenlist>
normal
</tokenlist>
<pattern>
<![CDATA[auto (\w) ; \1 = static_cast < (?:(?:\w+|<|>|::) )*(?:\w+|>)(?: &|\*)* > (\([^()]*(?-1)*[^()]*\)) ;]]>
</pattern>
<message>
<id>
RedundantCast
</id>
<severity>
style
</severity>
<summary>
Static cast is redundant.
</summary>
</message>
</rule>
<rule>
<rule>
<tokenlist>
normal
</tokenlist>
<tokenlist>
normal
</tokenlist>
<pattern>
<![CDATA[\? (true|false) : (true|false)]]>
</pattern>
<pattern>
<![CDATA[\? (true|false) : (true|false)]]>
</pattern>
...
...
Write
Preview
Markdown
is supported
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