Граф коммитов

24 Коммитов

Автор SHA1 Сообщение Дата
Chris Peterson 6f691d73b1 Bug 1475882 - clang-tidy: Enable misc-unused-alias-decls check. r=andi
This check finds unused namespace alias declarations. There are currently no misc-unused-alias-decls warnings in mozilla-central!

https://clang.llvm.org/extra/clang-tidy/checks/misc-unused-alias-decls.html

MozReview-Commit-ID: LHziGESvaM5

--HG--
extra : rebase_source : f10fbb6364bc947b5fa2ca8c0b47494519856940
extra : source : 987ca732290093c4bd36690c6ebd3ed2ac0b5444
2018-07-09 11:04:31 -07:00
Chris Peterson 6d8a23d9c8 Bug 1475882 - clang-tidy: Enable misc-swapped-arguments check. r=andi
This check finds potentially swapped function arguments by looking at implicit conversions. There are currently no misc-swapped-arguments warnings in mozilla-central!

https://clang.llvm.org/extra/clang-tidy/checks/bugprone-swapped-arguments.html

MozReview-Commit-ID: 6SETUcQhQP

--HG--
extra : rebase_source : d364fc90e776807ab2540d714594d07a5a83b054
extra : source : 689980bf12e98780d0d60c851549d16a4cc8efb0
2018-07-09 00:26:58 -07:00
Chris Peterson d9fe858d74 Bug 1475882 - clang-tidy: Enable misc-macro-repeated-side-effects check. r=andi
This check finds side effects from repeated macro arguments:

https://clang.llvm.org/extra/clang-tidy/checks/bugprone-macro-repeated-side-effects.html

There are currently 16 misc-macro-repeated-side-effects warnings in mozilla-central, but they are all in third-party gfx/cairo code:

gfx/cairo/cairo/src/cairo-tor-scan-converter.c:1432:10: warning: side effects in the 1st macro argument 'x' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1011:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1037:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1062:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1088:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1107:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1126:27: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1194:21: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:1258:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:600:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:629:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:660:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:690:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:721:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-access.c:986:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion
gfx/cairo/libpixman/src/pixman-edge-imp.h:126:20: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion

MozReview-Commit-ID: CQ6iO9JO773

--HG--
extra : rebase_source : 0e7dc6fa3990ab187c597d8042a403c554152b02
extra : source : 5f47d400d53107df0e0478b369745bfd3f055702
2018-07-09 10:14:40 -07:00
Chris Peterson 557f9a3436 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
2018-07-14 23:10:39 -07:00
Chris Peterson 11ee6d0d0c Bug 1475882 - clang-analyzer: Enable clang-analyzer-cplusplus.NewDelete check. r=andi
Check for double-free, use-after-free and offset problems involving C++ delete. There are currently no clang-analyzer-cplusplus.NewDelete warnings in mozilla-central!

https://clang-analyzer.llvm.org/available_checks.html

MozReview-Commit-ID: 9sVp4fc4JTj

--HG--
extra : rebase_source : 733974ff07b873f6e5cd1e83104f82eafbf7f3c7
extra : source : 778684b276e6658fb9f3fa125aaec984cca8760a
2018-07-14 23:07:40 -07:00
Chris Peterson 4ab09c5491 Bug 1473217 - Part 3: clang-tidy: Enable misc-unused-raii check. r=andi
Finds temporaries that look like RAII objects.

https://clang.llvm.org/extra/clang-tidy/checks/bugprone-unused-raii.html

MozReview-Commit-ID: KDYoF3YEbMu

--HG--
extra : rebase_source : 294b56106e9b44a5dd9b9a1778877921df0cf698
extra : intermediate-source : ca55794cb22c35c9cf1f29ff06e32cbcbb22230f
extra : source : 4b59f7e733d31e28a700213ad63d3581951ccc05
2018-07-02 10:52:35 -07:00
Chris Peterson 0c426c313c Bug 1473453 - Part 3: Enable clang-tidy's misc-bool-pointer-implicit-conversion warning. r=andi
And add a clang-tidy test.

MozReview-Commit-ID: KmCgrUcV0Lm

--HG--
extra : rebase_source : 0fad2e49472c565f59ba4218a6dc3099cca9d9cb
2018-07-04 19:30:33 -07:00
Jan Keromnes a4701a58b0 Bug 1468811 - Re-enable clang-tidy check performance-faster-string-find. r=sylvestre
It already had test files, but wasn't actually enabled. Also add a mock internal
std::string::find signature; two comments about disabled checks; and fix a typo.
2018-06-19 08:08:00 +03:00
Jan Keromnes e346734256 Bug 1468811 - Sort clang-tidy checks alphabetically in tools/clang-tidy/config.yaml. r=sylvestre 2018-06-19 08:06:00 +03:00
Andi-Bogdan Postelnicu 0374067886 Bug 1432410 - Add tests in tree to make sure we don't regress with clang-tidy on static-analisys. Tests wrote in part by :sylvestre. r=gps
MozReview-Commit-ID: IWxzKfWNIHG

--HG--
extra : rebase_source : d2bd65c66541e5d6e8d5cc721b117f0a3e7716e8
2018-05-03 20:06:16 +03:00
Sylvestre Ledru f5ce701429 Bug 1452098 - Remove the checker clang-analyzer-security.insecureAPI.gets r=andi
No longer in the C++11 standard

MozReview-Commit-ID: IdditTVKWtM

--HG--
extra : rebase_source : 00871a85f9e99d7ce36b397803b510a5ec8db530
2018-04-06 16:09:20 +02:00
Sylvestre Ledru e953fc6e58 Bug 1451316 - Rename clang-analyzer-security.UncheckedReturn to the correct name r=andi
MozReview-Commit-ID: DRPiNknhnGZ

--HG--
extra : rebase_source : f9b3c90214c74c7787324773b770342440d60c89
2018-04-04 14:53:42 +02:00
Sylvestre Ledru 814ab89b8a Bug 1451331 - Fix the name of the checkers as we are using clang-tidy 5.0 r=andi
MozReview-Commit-ID: 69gV9gsCZah

--HG--
extra : rebase_source : 4a8e6d817fb646a3579df8e71aded6579fcde2c7
2018-04-04 15:42:58 +02:00
Sylvestre Ledru ec0beeca80 Bug 1436354 - Enable modernize-use-bool-literals at review phase r=Ehsan
This won't warn about existing defects.

MozReview-Commit-ID: Fra6TmTREf2

--HG--
extra : rebase_source : 83a390edfbc68201a39c18cc618b304431163483
2018-02-07 15:14:32 +01:00
Sylvestre Ledru 6062c401f8 Bug 1437891 - Enable readability-redundant-string-cstr & readability-redundant-string-init checkers r=andi
MozReview-Commit-ID: 1QliseFa1mC

--HG--
extra : rebase_source : 0d8038d5678515d11a73e00870a618017348c011
2018-02-13 16:23:29 +01:00
Andi-Bogdan Postelnicu 48cbb200aa Bug 1430749 - Update the list of checkers in config.yaml to add some clang-analyzer-security checks. r=janx
MozReview-Commit-ID: BkccyEOktHS

--HG--
extra : rebase_source : 58193ed0350f2bb51474b02f824696fcc900ce6e
2018-01-16 14:43:05 +02:00
Sylvestre Ledru 96903a4e47 Bug 1422363 - Enable readability-static-accessed-through-instance in the static analysis r=andi
MozReview-Commit-ID: H65g81ZCSfp

--HG--
extra : rebase_source : 37797c334c55e3679026801e19d28ed8b49a3b4c
2017-12-01 19:12:49 +01:00
Sylvestre Ledru b1ad4c3c99 Bug 1422628 - enable bugprone-forward-declaration-namespace in the static analysis r=andi
MozReview-Commit-ID: LHvTVoyy81A

--HG--
extra : rebase_source : bc9a03323ef635a55b2b38297a8d61ca3d8e8320
2017-12-03 22:54:04 +01:00
Andi-Bogdan Postelnicu e213dce5f0 Bug 1420366 - remove modernize-use-override from clang-bot config. r=sylvestre
MozReview-Commit-ID: IEZ7NxP9pXe

--HG--
extra : rebase_source : e15d67bba37ddb54c20f6ad37ce99469eb9fe742
2017-11-24 12:26:32 +02:00
Sylvestre Ledru 90533210dc Bug 1415845 - Enable two more clang-tidy checkers: misc-unused-using-decls & misc-argument-comment r=andi
MozReview-Commit-ID: CXjGaqIdHan

--HG--
extra : rebase_source : 21dc4763d0a2f183d3946911dfaf5d68c834729c
2017-11-09 12:03:27 +01:00
Sylvestre Ledru b470a9a929 Bug 1411960 - Enable modernize-avoid-bind to recommend using lambda instead of std::bind r=andi
MozReview-Commit-ID: C9bOP9SxFan

--HG--
extra : rebase_source : 352bf343efeb26593b451bee4863e08838a93a5b
2017-10-26 15:09:54 +02:00
Andi-Bogdan Postelnicu 88b1f10b9f Bug 1402302 - sync checkers for static-analysis with the mozreview bot. r=sylvestre
MozReview-Commit-ID: I5rn4DEXGOK

--HG--
extra : rebase_source : 049079671c84a670718cf2efa2bd1a8c851446cc
2017-09-30 14:54:58 +03:00
Wes Kocher 2d79871195 Backed out changeset 048af66f7711 (bug 1402302) for lint issues in config.yaml a=backout
MozReview-Commit-ID: 8vkN5D8YVks
2017-09-29 14:23:59 -07:00
Andi-Bogdan Postelnicu c182f3e18d Bug 1402302 - sync checkers for static-analysis with the mozreview bot. r=sylvestre
MozReview-Commit-ID: I5rn4DEXGOK

--HG--
extra : rebase_source : 880d5ed66b45ca3de83b12561bf1a75eb5f1b198
2017-09-29 23:48:19 +03:00