Backed out changeset 7cefdbb63711 (bug 1544764) for static-analysis bustage on clang-analyzer-deadcode.DeadStores.cpp. CLOSED TREE

This commit is contained in:
Csoregi Natalia 2019-04-18 00:33:29 +03:00
Родитель 4a46d3a601
Коммит feb0789249
81 изменённых файлов: 81 добавлений и 214 удалений

Просмотреть файл

@ -1615,19 +1615,12 @@ class StaticAnalysisSubCommand(SubCommand):
class StaticAnalysisMonitor(object):
def __init__(self, srcdir, objdir, clang_tidy_config, total):
def __init__(self, srcdir, objdir, total):
self._total = total
self._processed = 0
self._current = None
self._srcdir = srcdir
self._clang_tidy_config = clang_tidy_config['clang_checkers']
# Transform the configuration to support Regex
for item in self._clang_tidy_config:
if item['name'] == '-*':
continue
item['name'].replace('*', '.*')
from mozbuild.compilation.warnings import (
WarningsCollector,
WarningsDatabase,
@ -1672,24 +1665,6 @@ class StaticAnalysisMonitor(object):
self._current = None
self._processed = self._processed + 1
return (warning, False)
if warning is not None:
def get_reliability(checker_name):
# get the matcher from self._clang_tidy_config that is the 'name' field
reliability = None
for item in self._clang_tidy_config:
if item['name'] == checker_name:
reliability = item.get('reliability', 'low')
break
else:
# We are using a regex in order to also match 'mozilla-.* like checkers'
matcher = re.match(item['name'], checker_name)
if matcher is not None and matcher.group(0) == checker_name:
reliability = item.get('reliability', 'low')
break
return reliability
reliability = get_reliability(warning['flag'])
if reliability is not None:
warning['reliability'] = reliability
return (warning, True)
@ -1793,7 +1768,7 @@ class StaticAnalysis(MachCommandBase):
args = self._get_clang_tidy_command(
checks=checks, header_filter=header_filter, sources=source, jobs=jobs, fix=fix)
monitor = StaticAnalysisMonitor(self.topsrcdir, self.topobjdir, self._clang_tidy_config, total)
monitor = StaticAnalysisMonitor(self.topsrcdir, self.topobjdir, total)
footer = StaticAnalysisFooter(self.log_manager.terminal, monitor)
with StaticAnalysisOutputManager(self.log_manager, monitor, footer) as output_manager:
@ -2537,10 +2512,6 @@ class StaticAnalysis(MachCommandBase):
test_file_path_json = mozpath.join(self._clang_tidy_base_path, "test", checker) + '.json'
# Read the pre-determined issues
baseline_issues = self._get_autotest_stored_issues(test_file_path_json)
# We also stored the 'reliability' index so strip that from the baseline_issues
baseline_issues[:] = [item for item in baseline_issues if 'reliability' not in item]
found = all([element_base in issues for element_base in baseline_issues])
if not found:
@ -2881,9 +2852,6 @@ class StaticAnalysis(MachCommandBase):
checkers_results.append(checker_error)
return self.TOOLS_CHECKER_RETURNED_NO_ISSUES
# Also store the 'reliability' index for this checker
issues.append({'reliability': item['reliability']})
if self._dump_results:
self._build_autotest_result(test_file_path_json, json.dumps(issues))
else:

Просмотреть файл

@ -23,181 +23,104 @@ clang_checkers:
- name: -*
publish: !!bool no
- name: bugprone-argument-comment
reliability: high
- name: bugprone-assert-side-effect
reliability: high
- name: bugprone-bool-pointer-implicit-conversion
reliability: low
- name: bugprone-forward-declaration-namespace
reliability: high
- name: bugprone-incorrect-roundings
reliability: high
- name: bugprone-integer-division
reliability: high
- name: bugprone-macro-parentheses
reliability: medium
- name: bugprone-macro-repeated-side-effects
reliability: high
- name: bugprone-misplaced-widening-cast
reliability: high
- name: bugprone-multiple-statement-macro
# Incompatible with our code base, see bug 1496379.
publish: !!bool no
reliability: high
- name: bugprone-sizeof-expression
reliability: high
- name: bugprone-string-constructor
reliability: high
- name: bugprone-string-integer-assignment
reliability: high
- name: bugprone-suspicious-memset-usage
reliability: high
- name: bugprone-suspicious-missing-comma
reliability: high
- name: bugprone-suspicious-semicolon
reliability: high
- name: bugprone-suspicious-string-compare
reliability: high
- name: bugprone-swapped-arguments
reliability: high
- name: bugprone-unused-raii
reliability: high
- name: bugprone-use-after-move
reliability: high
- name: clang-analyzer-core.CallAndMessage
reliability: medium
- name: clang-analyzer-core.DivideZero
reliability: high
- name: clang-analyzer-core.NonNullParamChecker
reliability: high
- name: clang-analyzer-core.NullDereference
reliability: medium
- name: clang-analyzer-core.UndefinedBinaryOperatorResult
reliability: medium
- name: clang-analyzer-core.uninitialized.Assign
reliability: medium
- name: clang-analyzer-core.uninitialized.Branch
reliability: medium
- name: clang-analyzer-cplusplus.NewDelete
reliability: medium
- name: clang-analyzer-cplusplus.NewDeleteLeaks
reliability: medium
- name: clang-analyzer-deadcode.DeadStores
reliability: high
- name: clang-analyzer-security.FloatLoopCounter
reliability: high
- name: clang-analyzer-security.insecureAPI.bcmp
reliability: high
- name: clang-analyzer-security.insecureAPI.bcopy
reliability: high
- name: clang-analyzer-security.insecureAPI.bzero
reliability: high
- name: clang-analyzer-security.insecureAPI.getpw
reliability: high
# We don't add clang-analyzer-security.insecureAPI.gets here; it's deprecated.
- name: clang-analyzer-security.insecureAPI.mkstemp
reliability: high
- name: clang-analyzer-security.insecureAPI.mktemp
reliability: high
- name: clang-analyzer-security.insecureAPI.rand
reliability: low
# C checker, that is outdated and doesn't check for the new std::rand calls.
publish: !!bool no
- name: clang-analyzer-security.insecureAPI.strcpy
reliability: low
# The functions that should be used differ on POSIX and Windows, and there
# isn't a consensus on how we should approach this.
publish: !!bool no
- name: clang-analyzer-security.insecureAPI.UncheckedReturn
reliability: low
- name: clang-analyzer-security.insecureAPI.vfork
reliability: medium
- name: clang-analyzer-unix.Malloc
reliability: high
- name: clang-analyzer-unix.cstring.BadSizeArg
reliability: high
- name: clang-analyzer-unix.cstring.NullArg
reliability: high
- name: misc-non-copyable-objects
reliability: high
- name: misc-redundant-expression
reliability: medium
- name: misc-unused-alias-decls
reliability: high
- name: misc-unused-using-decls
reliability: high
- name: modernize-avoid-bind
restricted-platforms:
- win32
- win64
reliability: medium
- name: modernize-loop-convert
reliability: high
- name: modernize-raw-string-literal
reliability: high
- name: modernize-redundant-void-arg
reliability: high
# We still have some old C code that is built with a C compiler, so this
# might break the build.
publish: !!bool no
- name: modernize-shrink-to-fit
reliability: high
- name: modernize-use-auto
reliability: high
# Controversial, see bug 1371052.
publish: !!bool no
- name: modernize-use-bool-literals
reliability: high
- name: modernize-use-equals-default
reliability: high
- name: modernize-use-equals-delete
reliability: high
- name: modernize-use-nullptr
reliability: high
- name: modernize-use-override
reliability: low
# Too noisy because of the way how we implement NS_IMETHOD. See Bug 1420366.
publish: !!bool no
- name: mozilla-*
reliability: high
- name: performance-faster-string-find
reliability: high
- name: performance-for-range-copy
reliability: high
- name: performance-implicit-conversion-in-loop
reliability: high
- name: performance-inefficient-algorithm
restricted-platforms:
- linux64
- macosx64
reliability: high
- name: performance-inefficient-string-concatenation
reliability: high
- name: performance-inefficient-vector-operation
reliability: high
- name: performance-move-const-arg
reliability: high
- name: performance-move-constructor-init
reliability: high
- name: performance-noexcept-move-constructor
reliability: high
- name: performance-type-promotion-in-math-fn
reliability: high
- name: performance-unnecessary-copy-initialization
reliability: high
- name: performance-unnecessary-value-param
reliability: high
- name: readability-braces-around-statements
reliability: high
# Note: this can be loosened up by using the ShortStatementLines option
- name: readability-container-size-empty
reliability: high
- name: readability-delete-null-pointer
reliability: high
- name: readability-else-after-return
reliability: high
- name: readability-implicit-bool-conversion
reliability: low
# On automation the config flags act strange. Please see Bug 1500241.
publish: !!bool no
config:
@ -208,67 +131,43 @@ clang_checkers:
# The check will allow conditional pointer conversions.
value: 1
- name: readability-inconsistent-declaration-parameter-name
reliability: high
- name: readability-misleading-indentation
reliability: high
- name: readability-non-const-parameter
reliability: high
- name: readability-redundant-control-flow
reliability: high
- name: readability-redundant-preprocessor
reliability: high
- name: readability-redundant-smartptr-get
reliability: high
- name: readability-redundant-string-cstr
reliability: high
- name: readability-redundant-string-init
reliability: high
- name: readability-static-accessed-through-instance
reliability: high
- name: readability-simplify-boolean-expr
reliability: high
- name: readability-uniqueptr-delete-release
reliability: high
# We don't publish the google checkers since we are interested in only having
# a general idea how our code complies with the rules added by these checkers.
- name: google-build-explicit-make-pair
reliability: low
publish: !!bool no
- name: google-build-namespaces
reliability: low
publish: !!bool no
- name: google-build-using-namespace
reliability: low
publish: !!bool no
- name: google-default-arguments
reliability: low
publish: !!bool no
- name: google-explicit-constructor
reliability: low
publish: !!bool no
- name: google-global-names-in-headers
reliability: low
publish: !!bool no
- name: google-readability-casting
reliability: low
publish: !!bool no
- name: google-readability-function-size
reliability: low
publish: !!bool no
- name: google-readability-namespace-comments
reliability: low
publish: !!bool no
- name: google-readability-todo
reliability: low
publish: !!bool no
- name: google-runtime-int
reliability: low
publish: !!bool no
- name: google-runtime-operator
reliability: low
publish: !!bool no
- name: google-runtime-references
reliability: low
publish: !!bool no
# Third party files from mozilla-central

Просмотреть файл

@ -1 +1 @@
[["warning", "argument name 'y' in comment does not match parameter name 'x'", "bugprone-argument-comment"], ["warning", "argument name 'z' in comment does not match parameter name 'y'", "bugprone-argument-comment"], {"reliability": "high"}]
[["warning", "argument name 'y' in comment does not match parameter name 'x'", "bugprone-argument-comment"], ["warning", "argument name 'z' in comment does not match parameter name 'y'", "bugprone-argument-comment"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "found assert() with side effect", "bugprone-assert-side-effect"], {"reliability": "high"}]
[["warning", "found assert() with side effect", "bugprone-assert-side-effect"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "dubious check of 'bool *' against 'nullptr', did you mean to dereference it?", "bugprone-bool-pointer-implicit-conversion"], {"reliability": "low"}]
[["warning", "dubious check of 'bool *' against 'nullptr', did you mean to dereference it?", "bugprone-bool-pointer-implicit-conversion"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "no definition found for 'A', but a definition with the same name 'A' found in another namespace 'nb'", "bugprone-forward-declaration-namespace"], {"reliability": "high"}]
[["warning", "no definition found for 'A', but a definition with the same name 'A' found in another namespace 'nb'", "bugprone-forward-declaration-namespace"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "casting (double + 0.5) to integer leads to incorrect rounding; consider using lround (#include <cmath>) instead", "bugprone-incorrect-roundings"], {"reliability": "high"}]
[["warning", "casting (double + 0.5) to integer leads to incorrect rounding; consider using lround (#include <cmath>) instead", "bugprone-incorrect-roundings"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "result of integer division used in a floating point context; possible loss of precision", "bugprone-integer-division"], {"reliability": "high"}]
[["warning", "result of integer division used in a floating point context; possible loss of precision", "bugprone-integer-division"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "macro replacement list should be enclosed in parentheses", "bugprone-macro-parentheses"], ["warning", "macro replacement list should be enclosed in parentheses", "bugprone-macro-parentheses"], ["warning", "macro argument should be enclosed in parentheses", "bugprone-macro-parentheses"], ["warning", "macro argument should be enclosed in parentheses", "bugprone-macro-parentheses"], ["warning", "macro argument should be enclosed in parentheses", "bugprone-macro-parentheses"], {"reliability": "medium"}]
[["warning", "macro replacement list should be enclosed in parentheses", "bugprone-macro-parentheses"], ["warning", "macro replacement list should be enclosed in parentheses", "bugprone-macro-parentheses"], ["warning", "macro argument should be enclosed in parentheses", "bugprone-macro-parentheses"], ["warning", "macro argument should be enclosed in parentheses", "bugprone-macro-parentheses"], ["warning", "macro argument should be enclosed in parentheses", "bugprone-macro-parentheses"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "side effects in the 1st macro argument 'x' are repeated in macro expansion", "bugprone-macro-repeated-side-effects"], {"reliability": "high"}]
[["warning", "side effects in the 1st macro argument 'x' are repeated in macro expansion", "bugprone-macro-repeated-side-effects"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "either cast from 'int' to 'long' is ineffective, or there is loss of precision before the conversion", "bugprone-misplaced-widening-cast"], {"reliability": "high"}]
[["warning", "either cast from 'int' to 'long' is ineffective, or there is loss of precision before the conversion", "bugprone-misplaced-widening-cast"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "suspicious usage of 'sizeof(this)'; did you mean 'sizeof(*this)'", "bugprone-sizeof-expression"], {"reliability": "high"}]
[["warning", "suspicious usage of 'sizeof(this)'; did you mean 'sizeof(*this)'", "bugprone-sizeof-expression"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "string constructor parameters are probably swapped; expecting string(count, character)", "bugprone-string-constructor"], ["warning", "length is bigger then string literal size", "bugprone-string-constructor"], ["warning", "constructor creating an empty string", "bugprone-string-constructor"], {"reliability": "high"}]
[["warning", "string constructor parameters are probably swapped; expecting string(count, character)", "bugprone-string-constructor"], ["warning", "length is bigger then string literal size", "bugprone-string-constructor"], ["warning", "constructor creating an empty string", "bugprone-string-constructor"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility", "bugprone-string-integer-assignment"], ["warning", "an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility", "bugprone-string-integer-assignment"], {"reliability": "high"}]
[["warning", "an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility", "bugprone-string-integer-assignment"], ["warning", "an integer is interpreted as a character code when assigning it to a string; if this is intended, cast the integer to the appropriate character type; if you want a string representation, use the appropriate conversion facility", "bugprone-string-integer-assignment"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "memset fill value is char '0', potentially mistaken for int 0", "bugprone-suspicious-memset-usage"], ["warning", "memset fill value is out of unsigned character range, gets truncated", "bugprone-suspicious-memset-usage"], ["warning", "memset of size zero, potentially swapped arguments", "bugprone-suspicious-memset-usage"], {"reliability": "high"}]
[["warning", "memset fill value is char '0', potentially mistaken for int 0", "bugprone-suspicious-memset-usage"], ["warning", "memset fill value is out of unsigned character range, gets truncated", "bugprone-suspicious-memset-usage"], ["warning", "memset of size zero, potentially swapped arguments", "bugprone-suspicious-memset-usage"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "suspicious string literal, probably missing a comma", "bugprone-suspicious-missing-comma"], {"reliability": "high"}]
[["warning", "suspicious string literal, probably missing a comma", "bugprone-suspicious-missing-comma"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "potentially unintended semicolon", "bugprone-suspicious-semicolon"], {"reliability": "high"}]
[["warning", "potentially unintended semicolon", "bugprone-suspicious-semicolon"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "function 'strcmp' is called without explicitly comparing result", "bugprone-suspicious-string-compare"], {"reliability": "high"}]
[["warning", "function 'strcmp' is called without explicitly comparing result", "bugprone-suspicious-string-compare"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "argument with implicit conversion from 'double' to 'int' followed by argument converted from 'int' to 'double', potentially swapped arguments.", "bugprone-swapped-arguments"], ["warning", "argument with implicit conversion from 'int' to 'double' followed by argument converted from 'double' to 'int', potentially swapped arguments.", "bugprone-swapped-arguments"], ["warning", "argument with implicit conversion from 'int' to 'double' followed by argument converted from 'double' to 'int', potentially swapped arguments.", "bugprone-swapped-arguments"], ["warning", "argument with implicit conversion from 'double' to 'int' followed by argument converted from 'int' to 'double', potentially swapped arguments.", "bugprone-swapped-arguments"], {"reliability": "high"}]
[["warning", "argument with implicit conversion from 'double' to 'int' followed by argument converted from 'int' to 'double', potentially swapped arguments.", "bugprone-swapped-arguments"], ["warning", "argument with implicit conversion from 'int' to 'double' followed by argument converted from 'double' to 'int', potentially swapped arguments.", "bugprone-swapped-arguments"], ["warning", "argument with implicit conversion from 'int' to 'double' followed by argument converted from 'double' to 'int', potentially swapped arguments.", "bugprone-swapped-arguments"], ["warning", "argument with implicit conversion from 'double' to 'int' followed by argument converted from 'int' to 'double', potentially swapped arguments.", "bugprone-swapped-arguments"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "object destroyed immediately after creation; did you mean to name the object?", "bugprone-unused-raii"], {"reliability": "high"}]
[["warning", "object destroyed immediately after creation; did you mean to name the object?", "bugprone-unused-raii"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "'ptr' used after it was moved", "bugprone-use-after-move"], {"reliability": "high"}]
[["warning", "'ptr' used after it was moved", "bugprone-use-after-move"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Passed-by-value struct argument contains uninitialized data (e.g., field: 'x')", "clang-analyzer-core.CallAndMessage"], {"reliability": "medium"}]
[["warning", "Passed-by-value struct argument contains uninitialized data (e.g., field: 'x')", "clang-analyzer-core.CallAndMessage"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Division by zero", "clang-analyzer-core.DivideZero"], {"reliability": "high"}]
[["warning", "Division by zero", "clang-analyzer-core.DivideZero"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Null pointer passed as an argument to a 'nonnull' parameter", "clang-analyzer-core.NonNullParamChecker"], {"reliability": "high"}]
[["warning", "Null pointer passed as an argument to a 'nonnull' parameter", "clang-analyzer-core.NonNullParamChecker"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Access to field 'x' results in a dereference of a null pointer (loaded from variable 'pc')", "clang-analyzer-core.NullDereference"], {"reliability": "medium"}]
[["warning", "Access to field 'x' results in a dereference of a null pointer (loaded from variable 'pc')", "clang-analyzer-core.NullDereference"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "The left operand of '+' is a garbage value", "clang-analyzer-core.UndefinedBinaryOperatorResult"], {"reliability": "medium"}]
[["warning", "The left operand of '+' is a garbage value", "clang-analyzer-core.UndefinedBinaryOperatorResult"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage", "clang-analyzer-core.uninitialized.Assign"], {"reliability": "medium"}]
[["warning", "The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage", "clang-analyzer-core.uninitialized.Assign"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Branch condition evaluates to a garbage value", "clang-analyzer-core.uninitialized.Branch"], {"reliability": "medium"}]
[["warning", "Branch condition evaluates to a garbage value", "clang-analyzer-core.uninitialized.Branch"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Use of memory after it is freed", "clang-analyzer-cplusplus.NewDelete"], ["warning", "Use of memory after it is freed", "clang-analyzer-cplusplus.NewDelete"], ["warning", "Attempt to free released memory", "clang-analyzer-cplusplus.NewDelete"], ["warning", "Argument to 'delete' is the address of the local variable 'i', which is not memory allocated by 'new'", "clang-analyzer-cplusplus.NewDelete"], {"reliability": "medium"}]
[["warning", "Use of memory after it is freed", "clang-analyzer-cplusplus.NewDelete"], ["warning", "Use of memory after it is freed", "clang-analyzer-cplusplus.NewDelete"], ["warning", "Attempt to free released memory", "clang-analyzer-cplusplus.NewDelete"], ["warning", "Argument to 'delete' is the address of the local variable 'i', which is not memory allocated by 'new'", "clang-analyzer-cplusplus.NewDelete"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Potential leak of memory pointed to by 'p'", "clang-analyzer-cplusplus.NewDeleteLeaks"], {"reliability": "medium"}]
[["warning", "Potential leak of memory pointed to by 'p'", "clang-analyzer-cplusplus.NewDeleteLeaks"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Value stored to 'x' is never read", "clang-analyzer-deadcode.DeadStores"], {"reliability": "medium"}]
[["warning", "Value stored to 'x' is never read", "clang-analyzer-deadcode.DeadStores"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Variable 'x' with floating point type 'float' should not be used as a loop counter", "clang-analyzer-security.FloatLoopCounter"], {"reliability": "high"}]
[["warning", "Variable 'x' with floating point type 'float' should not be used as a loop counter", "clang-analyzer-security.FloatLoopCounter"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "The return value from the call to 'setuid' is not checked. If an error occurs in 'setuid', the following code may execute with unexpected privileges", "clang-analyzer-security.insecureAPI.UncheckedReturn"], {"reliability": "low"}]
[["warning", "The return value from the call to 'setuid' is not checked. If an error occurs in 'setuid', the following code may execute with unexpected privileges", "clang-analyzer-security.insecureAPI.UncheckedReturn"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "The bcmp() function is obsoleted by memcmp()", "clang-analyzer-security.insecureAPI.bcmp"], {"reliability": "high"}]
[["warning", "The bcmp() function is obsoleted by memcmp()", "clang-analyzer-security.insecureAPI.bcmp"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "The bcopy() function is obsoleted by memcpy() or memmove()", "clang-analyzer-security.insecureAPI.bcopy"], {"reliability": "high"}]
[["warning", "The bcopy() function is obsoleted by memcpy() or memmove()", "clang-analyzer-security.insecureAPI.bcopy"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "The bzero() function is obsoleted by memset()", "clang-analyzer-security.insecureAPI.bzero"], {"reliability": "high"}]
[["warning", "The bzero() function is obsoleted by memset()", "clang-analyzer-security.insecureAPI.bzero"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "The getpw() function is dangerous as it may overflow the provided buffer. It is obsoleted by getpwuid()", "clang-analyzer-security.insecureAPI.getpw"], {"reliability": "high"}]
[["warning", "The getpw() function is dangerous as it may overflow the provided buffer. It is obsoleted by getpwuid()", "clang-analyzer-security.insecureAPI.getpw"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Call to 'mkstemp' should have at least 6 'X's in the format string to be secure (2 'X's seen)", "clang-analyzer-security.insecureAPI.mkstemp"], {"reliability": "high"}]
[["warning", "Call to 'mkstemp' should have at least 6 'X's in the format string to be secure (2 'X's seen)", "clang-analyzer-security.insecureAPI.mkstemp"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Call to function 'mktemp' is insecure as it always creates or uses insecure temporary file. Use 'mkstemp' instead", "clang-analyzer-security.insecureAPI.mktemp"], {"reliability": "high"}]
[["warning", "Call to function 'mktemp' is insecure as it always creates or uses insecure temporary file. Use 'mkstemp' instead", "clang-analyzer-security.insecureAPI.mktemp"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Call to function 'vfork' is insecure as it can lead to denial of service situations in the parent process. Replace calls to vfork with calls to the safer 'posix_spawn' function", "clang-analyzer-security.insecureAPI.vfork"], {"reliability": "medium"}]
[["warning", "Call to function 'vfork' is insecure as it can lead to denial of service situations in the parent process. Replace calls to vfork with calls to the safer 'posix_spawn' function", "clang-analyzer-security.insecureAPI.vfork"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Attempt to free released memory", "clang-analyzer-unix.Malloc"], ["warning", "Use of memory after it is freed", "clang-analyzer-unix.Malloc"], ["warning", "Potential leak of memory pointed to by 'p'", "clang-analyzer-unix.Malloc"], ["warning", "Argument to free() is the address of the local variable 'a', which is not memory allocated by malloc()", "clang-analyzer-unix.Malloc"], ["warning", "Argument to free() is offset by -4 bytes from the start of memory allocated by malloc()", "clang-analyzer-unix.Malloc"], {"reliability": "high"}]
[["warning", "Attempt to free released memory", "clang-analyzer-unix.Malloc"], ["warning", "Use of memory after it is freed", "clang-analyzer-unix.Malloc"], ["warning", "Potential leak of memory pointed to by 'p'", "clang-analyzer-unix.Malloc"], ["warning", "Argument to free() is the address of the local variable 'a', which is not memory allocated by malloc()", "clang-analyzer-unix.Malloc"], ["warning", "Argument to free() is offset by -4 bytes from the start of memory allocated by malloc()", "clang-analyzer-unix.Malloc"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Potential buffer overflow. Replace with 'sizeof(dest) - strlen(dest) - 1' or use a safer 'strlcat' API", "clang-analyzer-unix.cstring.BadSizeArg"], {"reliability": "high"}]
[["warning", "Potential buffer overflow. Replace with 'sizeof(dest) - strlen(dest) - 1' or use a safer 'strlcat' API", "clang-analyzer-unix.cstring.BadSizeArg"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "Null pointer argument in call to string length function", "clang-analyzer-unix.cstring.NullArg"], {"reliability": "high"}]
[["warning", "Null pointer argument in call to string length function", "clang-analyzer-unix.cstring.NullArg"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "'f' declared as type 'FILE', which is unsafe to copy; did you mean 'FILE *'?", "misc-non-copyable-objects"], {"reliability": "high"}]
[["warning", "'f' declared as type 'FILE', which is unsafe to copy; did you mean 'FILE *'?", "misc-non-copyable-objects"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "both sides of operator are equivalent", "misc-redundant-expression"], {"reliability": "medium"}]
[["warning", "both sides of operator are equivalent", "misc-redundant-expression"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "namespace alias decl 'n1_unused' is unused", "misc-unused-alias-decls"], ["warning", "namespace alias decl 'n12_unused' is unused", "misc-unused-alias-decls"], {"reliability": "high"}]
[["warning", "namespace alias decl 'n1_unused' is unused", "misc-unused-alias-decls"], ["warning", "namespace alias decl 'n12_unused' is unused", "misc-unused-alias-decls"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "using decl 'C' is unused", "misc-unused-using-decls"], {"reliability": "high"}]
[["warning", "using decl 'C' is unused", "misc-unused-using-decls"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "use range-based for loop instead", "modernize-loop-convert"], {"reliability": "high"}]
[["warning", "use range-based for loop instead", "modernize-loop-convert"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "escaped string literal can be written as a raw string literal", "modernize-raw-string-literal"], {"reliability": "high"}]
[["warning", "escaped string literal can be written as a raw string literal", "modernize-raw-string-literal"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "the shrink_to_fit method should be used to reduce the capacity of a shrinkable container", "modernize-shrink-to-fit"], ["warning", "the shrink_to_fit method should be used to reduce the capacity of a shrinkable container", "modernize-shrink-to-fit"], {"reliability": "high"}]
[["warning", "the shrink_to_fit method should be used to reduce the capacity of a shrinkable container", "modernize-shrink-to-fit"], ["warning", "the shrink_to_fit method should be used to reduce the capacity of a shrinkable container", "modernize-shrink-to-fit"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "converting integer literal to bool, use bool literal instead", "modernize-use-bool-literals"], ["warning", "converting integer literal to bool, use bool literal instead", "modernize-use-bool-literals"], ["warning", "converting integer literal to bool, use bool literal instead", "modernize-use-bool-literals"], ["warning", "converting integer literal to bool, use bool literal instead", "modernize-use-bool-literals"], {"reliability": "high"}]
[["warning", "converting integer literal to bool, use bool literal instead", "modernize-use-bool-literals"], ["warning", "converting integer literal to bool, use bool literal instead", "modernize-use-bool-literals"], ["warning", "converting integer literal to bool, use bool literal instead", "modernize-use-bool-literals"], ["warning", "converting integer literal to bool, use bool literal instead", "modernize-use-bool-literals"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "use '= default' to define a trivial default constructor", "modernize-use-equals-default"], ["warning", "use '= default' to define a trivial destructor", "modernize-use-equals-default"], {"reliability": "high"}]
[["warning", "use '= default' to define a trivial default constructor", "modernize-use-equals-default"], ["warning", "use '= default' to define a trivial destructor", "modernize-use-equals-default"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "use '= delete' to prohibit calling of a special member function", "modernize-use-equals-delete"], ["warning", "use '= delete' to prohibit calling of a special member function", "modernize-use-equals-delete"], ["warning", "use '= delete' to prohibit calling of a special member function", "modernize-use-equals-delete"], ["warning", "use '= delete' to prohibit calling of a special member function", "modernize-use-equals-delete"], {"reliability": "high"}]
[["warning", "use '= delete' to prohibit calling of a special member function", "modernize-use-equals-delete"], ["warning", "use '= delete' to prohibit calling of a special member function", "modernize-use-equals-delete"], ["warning", "use '= delete' to prohibit calling of a special member function", "modernize-use-equals-delete"], ["warning", "use '= delete' to prohibit calling of a special member function", "modernize-use-equals-delete"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "use nullptr", "modernize-use-nullptr"], {"reliability": "high"}]
[["warning", "use nullptr", "modernize-use-nullptr"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character", "performance-faster-string-find"], {"reliability": "high"}]
[["warning", "'find' called with a string literal consisting of a single character; consider using the more effective overload accepting a character", "performance-faster-string-find"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "the loop variable's type is not a reference type; this creates a copy in each iteration; consider making this a reference", "performance-for-range-copy"], {"reliability": "high"}]
[["warning", "the loop variable's type is not a reference type; this creates a copy in each iteration; consider making this a reference", "performance-for-range-copy"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "the type of the loop variable 'foo' is different from the one returned by the iterator and generates an implicit conversion; you can either change the type to the matching one ('const SimpleClass &' but 'const auto&' is always a valid option) or remove the reference to make it explicit that you are creating a new value", "performance-implicit-conversion-in-loop"], {"reliability": "high"}]
[["warning", "the type of the loop variable 'foo' is different from the one returned by the iterator and generates an implicit conversion; you can either change the type to the matching one ('const SimpleClass &' but 'const auto&' is always a valid option) or remove the reference to make it explicit that you are creating a new value", "performance-implicit-conversion-in-loop"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "this STL algorithm call should be replaced with a container method", "performance-inefficient-algorithm"], {"reliability": "high"}]
[["warning", "this STL algorithm call should be replaced with a container method", "performance-inefficient-algorithm"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead", "performance-inefficient-string-concatenation"], {"reliability": "high"}]
[["warning", "string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead", "performance-inefficient-string-concatenation"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "'push_back' is called inside a loop; consider pre-allocating the vector capacity before the loop", "performance-inefficient-vector-operation"], {"reliability": "high"}]
[["warning", "'push_back' is called inside a loop; consider pre-allocating the vector capacity before the loop", "performance-inefficient-vector-operation"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "std::move of the variable 'obj' of the trivially-copyable type 'TriviallyCopyable' has no effect; remove std::move()", "performance-move-const-arg"], {"reliability": "high"}]
[["warning", "std::move of the variable 'obj' of the trivially-copyable type 'TriviallyCopyable' has no effect; remove std::move()", "performance-move-const-arg"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "move constructor initializes base class by calling a copy constructor", "performance-move-constructor-init"], {"reliability": "high"}]
[["warning", "move constructor initializes base class by calling a copy constructor", "performance-move-constructor-init"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "move constructors should be marked noexcept", "performance-noexcept-move-constructor"], ["warning", "move assignment operators should be marked noexcept", "performance-noexcept-move-constructor"], {"reliability": "high"}]
[["warning", "move constructors should be marked noexcept", "performance-noexcept-move-constructor"], ["warning", "move assignment operators should be marked noexcept", "performance-noexcept-move-constructor"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "call to 'acos' promotes float to double", "performance-type-promotion-in-math-fn"], {"reliability": "high"}]
[["warning", "call to 'acos' promotes float to double", "performance-type-promotion-in-math-fn"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "the const qualified variable 'UnnecessaryCopy' is copy-constructed from a const reference; consider making it a const reference", "performance-unnecessary-copy-initialization"], {"reliability": "high"}]
[["warning", "the const qualified variable 'UnnecessaryCopy' is copy-constructed from a const reference; consider making it a const reference", "performance-unnecessary-copy-initialization"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "the const qualified parameter 'Value' is copied for each invocation; consider making it a reference", "performance-unnecessary-value-param"], {"reliability": "high"}]
[["warning", "the const qualified parameter 'Value' is copied for each invocation; consider making it a reference", "performance-unnecessary-value-param"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], {"reliability": "high"}]
[["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"], ["warning", "statement should be inside braces", "readability-braces-around-statements"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "the 'empty' method should be used to check for emptiness instead of 'size'", "readability-container-size-empty"], {"reliability": "high"}]
[["warning", "the 'empty' method should be used to check for emptiness instead of 'size'", "readability-container-size-empty"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "'if' statement is unnecessary; deleting null pointer has no effect", "readability-delete-null-pointer"], {"reliability": "high"}]
[["warning", "'if' statement is unnecessary; deleting null pointer has no effect", "readability-delete-null-pointer"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "do not use 'else' after 'return'", "readability-else-after-return"], {"reliability": "high"}]
[["warning", "do not use 'else' after 'return'", "readability-else-after-return"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "function 'S::f' has a definition with different parameter names", "readability-inconsistent-declaration-parameter-name"], {"reliability": "high"}]
[["warning", "function 'S::f' has a definition with different parameter names", "readability-inconsistent-declaration-parameter-name"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "different indentation for 'if' and corresponding 'else'", "readability-misleading-indentation"], {"reliability": "high"}]
[["warning", "different indentation for 'if' and corresponding 'else'", "readability-misleading-indentation"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "pointer parameter 'last' can be pointer to const", "readability-non-const-parameter"], {"reliability": "high"}]
[["warning", "pointer parameter 'last' can be pointer to const", "readability-non-const-parameter"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "redundant return statement at the end of a function with a void return type", "readability-redundant-control-flow"], {"reliability": "high"}]
[["warning", "redundant return statement at the end of a function with a void return type", "readability-redundant-control-flow"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "nested redundant #ifdef; consider removing it", "readability-redundant-preprocessor"], {"reliability": "high"}]
[["warning", "nested redundant #ifdef; consider removing it", "readability-redundant-preprocessor"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "redundant get() call on smart pointer", "readability-redundant-smartptr-get"], {"reliability": "high"}]
[["warning", "redundant get() call on smart pointer", "readability-redundant-smartptr-get"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "redundant call to 'c_str'", "readability-redundant-string-cstr"], {"reliability": "high"}]
[["warning", "redundant call to 'c_str'", "readability-redundant-string-cstr"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "redundant string initialization", "readability-redundant-string-init"], {"reliability": "high"}]
[["warning", "redundant string initialization", "readability-redundant-string-init"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "redundant boolean literal supplied to boolean operator", "readability-simplify-boolean-expr"], {"reliability": "high"}]
[["warning", "redundant boolean literal supplied to boolean operator", "readability-simplify-boolean-expr"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "static member accessed through instance", "readability-static-accessed-through-instance"], {"reliability": "high"}]
[["warning", "static member accessed through instance", "readability-static-accessed-through-instance"]]

Просмотреть файл

@ -1 +1 @@
[["warning", "prefer '= nullptr' to 'delete x.release()' to reset unique_ptr<> objects", "readability-uniqueptr-delete-release"], {"reliability": "high"}]
[["warning", "prefer '= nullptr' to 'delete x.release()' to reset unique_ptr<> objects", "readability-uniqueptr-delete-release"]]