зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1475882 - clang-analyzer: Enable clang-analyzer-cplusplus.NewDeleteLeaks check. r=andi
Check for memory leaks. Traces memory managed by new/ delete. There are currently no clang-analyzer-cplusplus.NewDeleteLeaks warnings in mozilla-central! https://clang-analyzer.llvm.org/available_checks.html MozReview-Commit-ID: 3tmwR26UB8K --HG-- extra : rebase_source : 3796cc6b61c03e83ce8b390e3342b870085b2ed2 extra : source : 3389fb54d2e3daee38db38503b37e9d994878bcd
This commit is contained in:
Родитель
11ee6d0d0c
Коммит
557f9a3436
|
@ -13,6 +13,8 @@ clang_checkers:
|
|||
publish: !!bool no
|
||||
- name: clang-analyzer-cplusplus.NewDelete
|
||||
publish: !!bool yes
|
||||
- name: clang-analyzer-cplusplus.NewDeleteLeaks
|
||||
publish: !!bool yes
|
||||
- name: clang-analyzer-deadcode.DeadStores
|
||||
publish: !!bool yes
|
||||
- name: clang-analyzer-security.FloatLoopCounter
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// https://clang-analyzer.llvm.org/available_checks.html
|
||||
|
||||
void test()
|
||||
{
|
||||
int *p = new int;
|
||||
} // warning
|
|
@ -0,0 +1 @@
|
|||
"[[\"warning\", \"Potential leak of memory pointed to by 'p'\", \"clang-analyzer-cplusplus.NewDeleteLeaks\"]]"
|
Загрузка…
Ссылка в новой задаче