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

106 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 88314c2170 Bug 1488631 - Remove annotations that the clang plugin doesn't handle. r=andi
As per bug 1487622, annotations have side effects on codegen, one of
which changes a leak signature that the wpt harness doesn't match
against its whitelist anymore.

Interestingly, while looking at the issue, I found multiple moz_*
annotations that weren't actually looked for by the clang plugin,
making them useless. Even more interestingly, removing them changes
codegen in such a way that the leak signature mentioned above is not
altered anymore.

Differential Revision: https://phabricator.services.mozilla.com/D5000
2018-09-08 06:49:48 +09:00
Myk Melez 7978cd2fe4 Bug 1482810 - set COMPILE_FLAGS var to hide warnings for Rust crates r=chmanchester
In conjunction with the cc crate changes in https://github.com/alexcrichton/cc-rs/pull/342 (which I'll land in https://phabricator.services.mozilla.com/D4699), this hides warnings generated by C code in Rust crates (by removing warnings flags from CFLAGS when compiling Rust libraries).

MozReview-Commit-ID: 9CZgLGbWjbA

Differential Revision: https://phabricator.services.mozilla.com/D3939

--HG--
extra : moz-landing-system : lando
2018-08-30 17:29:54 +00:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Andi-Bogdan Postelnicu c523c8faa9 Bug 1440886 - Implement a static analysis checker to detect usage of PR_LoadLibrary and LoadLibraryA/LoadLibraryExA/LoadLibrary/LoadLibraryEx. r=Nika
MozReview-Commit-ID: CUjfeBeOdsk

--HG--
extra : rebase_source : 633b900794cba24030c2b93d4d070d1447fff39b
2018-03-07 14:36:44 +02:00
Jeff Walden cba0aa5d89 Bug 1452754 - Add tests to TestMustReturnFromCaller.cpp that verify that RAII destruction after a must-return-after expression is permitted. r=mystor
--HG--
extra : rebase_source : 6ca1082b766393fa90f3631fd09a399e01c9e6e6
2018-04-09 12:56:37 -07:00
Emilio Cobos Álvarez 2125f0fbd4 Bug 1444416: Handle references in the "can run script" checker. r=mystor
MozReview-Commit-ID: 8F9HjiFqbGN

--HG--
extra : rebase_source : 03d49b9a605ff5eade81a814b0903f81d87720ab
2018-03-09 17:51:59 +01:00
Chris Peterson fe5cd3d5d9 Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj
MozReview-Commit-ID: 8pjYjEvQF42

--HG--
extra : rebase_source : 5eb0bea2ef5f06a811b4f3daf57ce8720f12dd07
2018-02-08 21:22:43 -08:00
Chris Peterson d09123f248 Bug 1436263 - Part 1: Replace `final override` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08:00
Eric Rahm f311645aa5 Bug 1434689 - Part 1: Add moz_temporary_class annotation. r=mystor
This adds a `moz_temporary_class` annotation that can be used to indicate
a class is intended to only be used as a temporary.

--HG--
extra : rebase_source : 2c4d5f0946739eafba485053624199bd4a05107a
2018-01-31 15:03:26 -08:00
Emilio Cobos Álvarez b012f3eebd Bug 1434001: Handle lambdas in CanRunScriptChecker. r=mystor
Such a shame that the functionDecl() matcher doesn't handle them. I didn't find
a cleaner way to handle them, but I'm a 100% noob with AST matchers, so there
may be a more elegant way to do this.

MozReview-Commit-ID: 3HJQdFpN4hy

--HG--
extra : rebase_source : 27e48e6fb264499fd99e75eb54a22276758ab3e4
2018-01-29 22:08:15 +01:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Julian Hector 378f6d9cfb Bug 1398874 - Add static analysis to reject ParamTraits specializations for enum types. r=mystor 2017-12-05 10:26:41 -05:00
Nika Layzell a124bfae77 Bug 1418465 - Add an opt-out to the MOZ_CAN_RUN_SCRIPT analysis, r=andi
MozReview-Commit-ID: 2YKncUdrT5p
2017-11-24 11:15:17 -05:00
Chris Manchester d43c1ef2dd Bug 1403346 - Implement clang-plugin cxxflags in moz.build. r=glandium
MozReview-Commit-ID: 9zSryJcTRGl
2017-10-25 15:12:10 -07:00
Chris Manchester fab07bc443 Bug 1386876 - Replace all uses of NO_VISIBILITY_FLAGS with a template and remove NO_VISIBILITY_FLAGS. r=glandium
MozReview-Commit-ID: 194U1WMCAM0

--HG--
extra : rebase_source : 365b68b0a1772d238ae9b84966e53dcd1197fd85
2017-05-01 18:12:35 -07:00
Chris Manchester c0a229d4c3 Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium
MozReview-Commit-ID: FMEtb5PY7iP

--HG--
extra : rebase_source : 3cdee7528846462c758e623d6bcd2e6e17dbabff
2017-09-11 11:33:26 -07:00
Tristan Bourvon ba0998ae31 Bug 1380423 - Add static-analysis to enforce strict rules on functions which can run scripts. r=mystor
MozReview-Commit-ID: GGSyq0z5msB
2017-08-08 19:48:53 +03:00
Tristan Bourvon 2e77c99160 Bug 1374024 - add checker to prevent dangling pointers returned by method calls on temporaries. r=mystor
MozReview-Commit-ID: 9khNt59ONF
2017-07-05 16:14:21 +02:00
Carsten "Tomcat" Book 6f930b42b1 Backed out changeset 1a0693cc418b (bug 1374024) for bustage 2017-07-13 15:14:51 +02:00
Tristan Bourvon 473b245885 Bug 1374024 - add checker to prevent dangling pointers returned by method calls on temporaries. r=mystor
MozReview-Commit-ID: 9khNt59ONFE
2017-07-05 16:14:21 +02:00
Carsten "Tomcat" Book 2332473008 Backed out changeset 1a49d403a9a4 (bug 1374024) for bustage 2017-07-13 11:10:31 +02:00
Tristan Bourvon 20068f7ba3 Bug 1374024 - add checker to prevent dangling pointers returned by method calls
on temporaries. r=mystor

MozReview-Commit-ID: 9khNt59ONFE
2017-07-05 16:14:21 +02:00
Michael Layzell 2372ce0fc1 Bug 1339537 - Part 5: Produce better annotation reason diagnostics for implicit annotations, r=ehsan
This allows for the alignas(_) case to be distinguished from the
MOZ_NON_PARAM case through notes.

MozReview-Commit-ID: 4KIbzEKnmNU
2017-04-27 12:44:55 -04:00
Michael Layzell 221c4e65ae Bug 1339537 - Part 2: Update the MOZ_NON_PARAM analysis to implicitly apply to alignas(_) types, r=ehsan
MozReview-Commit-ID: 2VDJRxxkVjV
2017-04-27 12:44:49 -04:00
Michael Layzell 4689eec07a Bug 1331434 - Part 1: Add an analysis to require a return after calls to annotated functions, r=ehsan
MozReview-Commit-ID: 7NqXap8FdSn
2017-03-07 19:06:48 -05:00
Michael Layzell 54f10d1dd6 Bug 1336510 - Part 1: Correct the RefCountedInsideLambda Check to complain about capturing and using `this` without a backing strong reference, r=ehsan
MozReview-Commit-ID: 19jiqArKgxo
2017-03-01 15:09:44 -05:00
Ehsan Akhgari 18f30a60a6 Bug 1325694 - Mark the MSVC specific std::atomic base classes as memmovable for static analysis; r=froydnj 2016-12-23 21:03:21 -05:00
Ting-Yu Chou 4e68f1ffa7 Bug 1322465 part 8 - Use explicit/MOZ_IMPLICIT for the unary constructors in mfbt/. r=Ehsan
MozReview-Commit-ID: 2TpfrAaAIuu

--HG--
extra : rebase_source : 4fb5af1beb94c059cbadfaf27fe3949ae8b85efb
2016-12-16 15:57:15 +08:00
Ting-Yu Chou 4118473061 Bug 1316545 part 6 - Suppress the warning of invalid noreturn. r=ehsan
MozReview-Commit-ID: CXt1DezWsgL

--HG--
extra : histedit_source : 8ad1d02a9abc00722d870810fc6c2e20744eb529
2016-11-25 16:22:00 +08:00
Ting-Yu Chou a008dced39 Bug 1316545 part 5 - Make misuseX() concrete such that the AST is computed even if it is unused. r=mystor
MozReview-Commit-ID: 4kkWJjvATzC

--HG--
extra : histedit_source : dedc8935c4dfe513f2a266e31c34eab03f897c71
2016-11-24 11:48:33 +08:00
Nathan Froyd 2ebbd09068 Bug 1320752 - remove mozilla/Function.h; r=gerald
We have std::function available now, which is likely to be somewhat more
efficient.
2016-11-28 11:03:53 -05:00
Ehsan Akhgari bc354ecd55 Bug 1319903 - Part 1: Ignore ParenExpr's when ignoring trivial expressions; r=mystor 2016-11-23 18:00:00 -05:00
Tooru Fujisawa 19d7f7bb03 Bug 1290337 - Part 22: Add moz_non_param annotation. r=ehsan,jwalden 2016-09-11 18:23:11 +09:00
Andi-Bogdan Postelnicu e0d7fa5720 Bug 1307702 - clang-plugin - static analysis to reject ussage of MOZ_REQUIRED_BASE_METHOD on non-virtual base methods. r=mystor
MozReview-Commit-ID: 9G79Wm5fbHc
2016-10-06 14:02:20 +03:00
Andi-Bogdan Postelnicu d447f00057 Bug 1230311 - clang-plugin - static analysis to enforce that if a method is overridden also base method is called. r=mystor
MozReview-Commit-ID: 1JYzYZZOh3W
2016-10-06 13:49:00 +03:00
Tom Schuster 3cc61134b1 Bug 1302163 - Show an error for [v]snprintf with literals using the clang plugin. r=ehsan 2016-10-04 17:57:50 +02:00
Michael Layzell 9c75f35e6a Bug 1018486 - Part 10: Add an analysis to reject the kungFuDeathGrip pattern on function results and member variables, r=ehsan
MozReview-Commit-ID: K8rehjAxIA6
2016-09-07 10:50:48 -04:00
Michael Layzell 44ec98cd05 Bug 1244825 - Detect classes with two superclasses with mRefCnt members, r=ehsan 2016-08-05 13:51:35 -04:00
Michael Layzell 652e9475bc Bug 1281935 - Part 1: Relax raw pointer inside lambda analysis, r=ehsan 2016-08-02 15:27:43 -04:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Andi-Bogdan Postelnicu de0b1d9c7a Bug 1283395 - clang-plugin - add an error if we encounter in MOZ_ASSERT assignment instead of logical expression. r=mystor
MozReview-Commit-ID: AybStmi6MIH

--HG--
extra : rebase_source : 6379599db347975436181c3807893f939f624b24
2016-07-19 09:59:22 +03:00
Michael Layzell 6dd5afa601 Bug 1209227 - Part 1: Make the MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS analysis handle packs more correctly, r=ehsan 2016-05-19 09:34:01 -04:00
Nicholas Nethercote a5c843fe5f Bug 1267550 (part 1) - Rename MOZ_MUST_USE as MOZ_MUST_USE_TYPE. r=ehsan.
This will allow MOZ_MUST_USE to be used for a different and more common case.

MozReview-Commit-ID: 4dQsdWjJfc6

--HG--
extra : rebase_source : 390ab56ef83d71eb6d28759a0195a79a78b153bd
2016-04-27 08:22:10 +10:00
Ehsan Akhgari 09ce2152c7 Bug 1264827 - Part 2: Add a static analysis to help check Rust wrapped C++ classes for members which are unsafe to memmove; r=mystor 2016-04-18 15:43:46 -04:00
Michael Layzell c4c75e9287 Bug 1254247 - Ignore implicit Expr wrappers due to temporary cleanup in MUST_USE analysis, r=ehsan 2016-03-11 18:29:47 -05:00
Mike Hommey cbb8f056e6 Bug 1255540 - Properly run the clang-plugin tests. r=gps 2016-03-11 12:22:24 +09:00
Andrea Marchesini 856342a4be Bug 1253187 - Remove some warnings in clang-plugin tests, r=ehsan 2016-03-03 18:31:12 +01:00
Michael Layzell 299ac653c2 Bug 1242789 - Allow lambdas to capture raw pointers to refcounted objects by reference, r=ehsan 2016-01-26 13:32:41 -05:00
Michael Layzell 2b12d59585 Bug 1226376 - Part 1: Allow non-trivial constexpr constructors in MOZ_TRIVIAL_CTOR_DTOR classes, r=ehsan 2016-01-08 15:34:24 -05:00
Jed Davis f377ca14ea Bug 1201314 - Make most of std:: non-memmovable for static analysis purposes. r=mystor r=ehsan
For simplicity, the exceptions are hard-coded in the plugin: currently
std::pair and std::atomic.
2015-10-14 18:13:00 +02:00