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

484 Коммитов

Автор SHA1 Сообщение Дата
Jean-Yves Avenard 87ab775e09 Bug 1647628 - Make ImageBridgeChild use a background taskqueue. r=KrisWright,andi
Differential Revision: https://phabricator.services.mozilla.com/D80599
2020-07-02 00:27:47 +00:00
Jean-Yves Avenard 8fc6e95f6c Bug 1649294 - Make RemoteDecoder use a background taskqueue. r=mattwoodrow,andi
There's a small race that can happen when the remote decoder gets shutdown during xpcom shutdown; that would cause GetCurrentSerialEventTarget to return null. Leading to an assertion failure in ActorLifecycleProxy thread-safety check when PRemoteDecoderManagerParent gets destroyed.

So we use a background taskqueue instead and cleanup a bit the threading code in there allowed thanks to the TaskQueue ability to not require an explicit shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D81287
2020-07-02 00:26:46 +00:00
Narcis Beleuzu 3700aab557 Backed out 7 changesets (bug 1634846, bug 1647628, bug 1649294, bug 1647112) for webgl-conf crashes. CLOSED TREE
Backed out changeset 4441d06e96c3 (bug 1647628)
Backed out changeset 4efaf32bc8f7 (bug 1647112)
Backed out changeset 2d24ad813039 (bug 1647112)
Backed out changeset fda262d73a13 (bug 1649294)
Backed out changeset 5863f9c5229f (bug 1634846)
Backed out changeset bca79526745d (bug 1634846)
Backed out changeset d539408a0048 (bug 1634846)
2020-06-30 09:50:00 +03:00
Jean-Yves Avenard 00688236a3 Bug 1647628 - Make ImageBridgeChild use a background taskqueue. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D80599
2020-06-24 01:38:30 +00:00
Jean-Yves Avenard 135d109d8e Bug 1647112 - P1. Make the canvas thread use BackgroundTaskQueue. r=KrisWright
Some headers cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D80597
2020-06-30 02:33:02 +00:00
Jean-Yves Avenard c251c5b2c7 Bug 1649294 - Make RemoteDecoder use a background taskqueue. r=mattwoodrow
There's a small race that can happen when the remote decoder gets shutdown during xpcom shutdown; that would cause GetCurrentSerialEventTarget to return null. Leading to an assertion failure in ActorLifecycleProxy thread-safety check when PRemoteDecoderManagerParent gets destroyed.

So we use a background taskqueue instead and cleanup a bit the threading code in there allowed thanks to the TaskQueue ability to not require an explicit shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D81287
2020-06-30 02:50:38 +00:00
Andrea Marchesini c6e87ab4b6 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 5 - thread, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D80928
2020-06-29 13:39:01 +00:00
Razvan Maries f7cb24cc7e Backed out 8 changesets (bug 1648141) for build bustages on RemoteLazyInputStreamThread.cpp. CLOSED TREE
Backed out changeset e9b4ca0ee700 (bug 1648141)
Backed out changeset b9bb847cee47 (bug 1648141)
Backed out changeset 11dfce46ec14 (bug 1648141)
Backed out changeset d824d2f67f27 (bug 1648141)
Backed out changeset e5b8292e7095 (bug 1648141)
Backed out changeset c1a3d5fa0c61 (bug 1648141)
Backed out changeset 24fdb83db3cd (bug 1648141)
Backed out changeset 749d894dde52 (bug 1648141)
2020-06-29 13:59:16 +03:00
Andrea Marchesini 2641b9afe4 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 5 - thread, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D80928
2020-06-29 10:27:38 +00:00
David Major 5b95767d8c Bug 1646158 - Fix StringRef conversions in clang-plugin for clang 11 r=static-analysis-reviewers,andi
In adcd026838, conversions from `StringRef` to `std::string` became `explicit`.

The NFC fix would be to wrap the conversions in `std::string(...)` but since these are all short-lived uses for things like string compares, I've refactored a bit to keep them in native form.

Differential Revision: https://phabricator.services.mozilla.com/D79895
2020-06-17 15:56:44 +00:00
David Major 2b811400db Bug 1646158 - Make `DynTypedNodeList` work with clang11 r=static-analysis-reviewers,andi
In 8a81daaa8b, the class `DynTypedNodeList` moved from `ASTContext` to global level.

Differential Revision: https://phabricator.services.mozilla.com/D79886
2020-06-17 15:56:44 +00:00
David Major 36940c61ca Bug 1646158 - Make nested template checks work with clang 11 r=static-analysis-reviewers,andi
Sometime during clang 11 (I don't have the exact commit handy), the display of nested templates changed from `Foo<Bar<X> >` to `Foo<Bar<X>>`.

Differential Revision: https://phabricator.services.mozilla.com/D79894
2020-06-17 15:56:11 +00:00
Tom Ritter 08b3cf1f4f Bug 1644852 - Add an external/CustomAttributes.inc r=andi
This will allow us to define CustomAttributes for external checks.

Differential Revision: https://phabricator.services.mozilla.com/D79179
2020-06-10 14:28:57 -05:00
Kartikaya Gupta cc4b5edc35 Bug 1638664 - Improve the way MozsearchIndexer merges analysis data. r=asuth
Instead of doing this:
a) read existing file into memory
b) append new entries
c) sort all entries
d) write unique entries back to file

We now do this:
a) sort new entries
b) loop through existing file entries, one at a time, writing them to a tmp file
c) insert the new entries in between the existing file entries in lexicographic order,
   and deduplicating the new entries
d) write any remaining new entries (that are lexicographically after the last
   entry in the pre-existing file), again deduplicating the entries
e) move tmp file back to original file location

This avoids reading the entire file into memory which could be potentially
hundreds of MB large.

The changes in FileOperations.* are needed to support these changes, as we now
have two files that we're dealing with - reading from one and writing to the
other. We still use a Mutex (Windows) or exclusive-flock (POSIX) on the file
for the duration of the entire operation, so we should still be robust in the
face of multiple concurrently running clang processes.

Differential Revision: https://phabricator.services.mozilla.com/D76202
2020-05-25 18:53:36 +00:00
Thomas Duellmann 5123bc5ab2 Bug 1638576 - Correct spelling of "deprecated" (follow-up to bug 1611160). r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D75714
2020-05-17 20:20:38 +00:00
Sebastian Streich 479a4cb3a1 Bug 1636148 - Disable Building Principal->GetURI r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D74249
2020-05-14 19:42:59 +00:00
Dorel Luca c269f23ce0 Backed out 2 changesets (bug 1636148) for Build bustage on android in gecko/widget/android/nsWindow.cpp. CLOSED TREE
Backed out changeset fca4a9808bd9 (bug 1636148)
Backed out changeset 6fda7ca2484d (bug 1636148)
2020-05-12 17:01:59 +03:00
Sebastian Streich ccd7500298 Bug 1636148 - Disable Building Principal->GetURI r=ckerschb
Depends on D74248

Differential Revision: https://phabricator.services.mozilla.com/D74249
2020-05-12 12:50:03 +00:00
Jean-Yves Avenard 26d1508deb Bug 1634253 - P8. Remove use of MessageLoop in Canvas. r=mattwoodrow
MessagePool brings no benefit over the traditional nsIThread.

Additonally, replace some incorrect use of RefPtr for xpcom objects.

Differential Revision: https://phabricator.services.mozilla.com/D73827
2020-05-08 20:20:39 +00:00
Jean-Yves Avenard 912e294406 Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73825
2020-05-08 20:20:44 +00:00
Narcis Beleuzu 58a833221c Backed out 9 changesets (bug 1634253) for bc failures on browser_bug295977_autoscroll_overflow.js . CLOSED TREE
Backed out changeset d41b75c1f7ec (bug 1634253)
Backed out changeset 5f8a1ee17b81 (bug 1634253)
Backed out changeset 43eda078b405 (bug 1634253)
Backed out changeset e98212a74709 (bug 1634253)
Backed out changeset 855e222ceb14 (bug 1634253)
Backed out changeset 9f01acdf4367 (bug 1634253)
Backed out changeset ea62cb1ec472 (bug 1634253)
Backed out changeset fa3e7588e7d6 (bug 1634253)
Backed out changeset 139e7035e736 (bug 1634253)
2020-05-08 23:09:31 +03:00
Jean-Yves Avenard 2facca62f0 Bug 1634253 - P8. Remove use of MessageLoop in Canvas. r=mattwoodrow
MessagePool brings no benefit over the traditional nsIThread.

Additonally, replace some incorrect use of RefPtr for xpcom objects.

Differential Revision: https://phabricator.services.mozilla.com/D73827
2020-05-08 11:44:59 +00:00
Jean-Yves Avenard f304da03ac Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73825
2020-05-07 08:04:53 +00:00
Dorel Luca 9340fa2b2d Backed out 11 changesets (bug 1635001, bug 1634253) for Browser-chrome failures in browser_bug295977_autoscroll_overflow.js
Backed out changeset c3c27cb46db6 (bug 1635001)
Backed out changeset 6cea251e5910 (bug 1635001)
Backed out changeset 3cb0a05be7fc (bug 1635001)
Backed out changeset 1cbb2866a3ad (bug 1634253)
Backed out changeset 53fd00dcf95c (bug 1634253)
Backed out changeset e3acd9db7065 (bug 1634253)
Backed out changeset 5c0b7aa99406 (bug 1634253)
Backed out changeset dc7e17f772be (bug 1634253)
Backed out changeset 6e47af64396a (bug 1634253)
Backed out changeset 8865de9ae0ef (bug 1634253)
Backed out changeset 6fac93b596c2 (bug 1634253)
2020-05-07 11:00:04 +03:00
Jean-Yves Avenard 41502d2149 Bug 1634253 - P8. Remove use of MessageLoop in Canvas. r=mattwoodrow
MessagePool brings no benefit over the traditional nsIThread.

Additonally, replace some incorrect use of RefPtr for xpcom objects.

Differential Revision: https://phabricator.services.mozilla.com/D73827
2020-05-07 05:03:57 +00:00
Jean-Yves Avenard 96d7622823 Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73825
2020-05-07 05:03:42 +00:00
Andrew Sutherland 557c96ce11 Bug 1635198 - Make make_unique work in multiple build scenarios. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D73755
2020-05-04 20:55:17 +00:00
Razvan Maries 8788e3f288 Backed out changeset 3078e3882816 (bug 1631399) as per Kartikaya's request for causing bug 1634345. CLOSED TREE 2020-04-30 18:15:08 +03:00
Ricky Stewart 4f144ab8dc Bug 1631399 - Use `std::make_unique` rather than `llvm::make_unique` in `MozsearchIndexer.cpp` r=emilio
`llvm::make_unique` is a drop-in alternative for `std::make_unique` that isn't useful in post-C++14 world, so it was [deleted](https://reviews.llvm.org/D66259). This is the only file that calls `llvm::make_unique` as opposed to the `std` function.

Differential Revision: https://phabricator.services.mozilla.com/D72967
2020-04-28 23:03:50 +00:00
Iain Ireland 940b09c9e0 Bug 1630383: Add irregexp to ignore list for implicit constructor static analysis r=sfink
The V8 code in the new engine uses implicit constructors with wild abandon, and it doesn't seem like a good use of time to try upstreaming a patch to remove them.

Depends on D71355

Differential Revision: https://phabricator.services.mozilla.com/D71356
2020-04-17 17:18:57 +00:00
Andrea Marchesini a765ed14dd Bug 1363541 - Modernize the PermissionManager - part 3 - DB handling in a separate thread, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D69965

--HG--
extra : moz-landing-system : lando
2020-04-11 13:41:19 +00:00
Razvan Maries b74e338c98 Backed out 6 changesets (bug 1363541) for perma failures. CLOSED TREE
Backed out changeset a775f6e9eb41 (bug 1363541)
Backed out changeset 9212bfd89eca (bug 1363541)
Backed out changeset bf41b0c139f6 (bug 1363541)
Backed out changeset aa7c6668b249 (bug 1363541)
Backed out changeset 9f413a8a47bb (bug 1363541)
Backed out changeset 827a9a2866bd (bug 1363541)

--HG--
rename : extensions/permissions/Permission.cpp => extensions/permissions/nsPermission.cpp
rename : extensions/permissions/Permission.h => extensions/permissions/nsPermission.h
rename : extensions/permissions/PermissionManager.cpp => extensions/permissions/nsPermissionManager.cpp
rename : extensions/permissions/PermissionManager.h => extensions/permissions/nsPermissionManager.h
2020-04-10 11:31:20 +03:00
Andrea Marchesini f78d7b4bd4 Bug 1363541 - Modernize the PermissionManager - part 3 - DB handling in a separate thread, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D69965

--HG--
extra : moz-landing-system : lando
2020-04-10 06:36:03 +00:00
Andi-Bogdan Postelnicu 56a9802f89 Bug 1625884 - move `clang-tidy` and `clang-format` to `clang-10`. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D70065

--HG--
extra : moz-landing-system : lando
2020-04-09 14:16:44 +00:00
Coroiu Cristina d37de5ed78 Backed out 6 changesets (bug 1363541) for browser-chrome failures at browser/base/content/test/performance/browser_startup_mainthreadio.js on a CLOSED TREE
Backed out changeset 947073be919f (bug 1363541)
Backed out changeset 1f397b686c11 (bug 1363541)
Backed out changeset d2ba944a47a3 (bug 1363541)
Backed out changeset 80d4d1f0c921 (bug 1363541)
Backed out changeset 9d6b9052f413 (bug 1363541)
Backed out changeset aeaa10789071 (bug 1363541)

--HG--
rename : extensions/permissions/Permission.cpp => extensions/permissions/nsPermission.cpp
rename : extensions/permissions/Permission.h => extensions/permissions/nsPermission.h
rename : extensions/permissions/PermissionManager.cpp => extensions/permissions/nsPermissionManager.cpp
rename : extensions/permissions/PermissionManager.h => extensions/permissions/nsPermissionManager.h
2020-04-10 01:00:15 +03:00
Andrea Marchesini f71aefda4e Bug 1363541 - Modernize the PermissionManager - part 3 - DB handling in a separate thread, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D69965

--HG--
extra : moz-landing-system : lando
2020-04-09 13:26:29 +00:00
Mihai Alexandru Michis 55acbee264 Merge mozilla-central to autoland a=merge on a CLOSED TREE 2020-04-09 22:35:35 +03:00
Cosmin Sabou 60934f9072 Backed out 3 changesets (bug 1625884) as requested by ANdi for causing build bustages. a=backout
Backed out changeset a35cfda6e271 (bug 1625884)
Backed out changeset 412c8c401196 (bug 1625884)
Backed out changeset 927ff250bc4b (bug 1625884)
2020-04-09 16:14:06 +03:00
Simon Giesecke ee4a4129a1 Bug 1605075 - Ignore kfdg variables initialized from xvalues in KungFuDeatGripChecker. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D70325

--HG--
extra : moz-landing-system : lando
2020-04-09 09:48:13 +00:00
Andi-Bogdan Postelnicu ffe0a6a754 Bug 1625884 - move `clang-tidy` and `clang-format` to `clang-10`. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D70065

--HG--
extra : moz-landing-system : lando
2020-04-09 05:28:34 +00:00
Simon Giesecke 47a27132fa Bug 1614371 - Move mozilla-performance-temp-refptr check to alpha checker repo. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D65340

--HG--
rename : build/clang-plugin/TempRefPtrChecker.cpp => build/clang-plugin/alpha/TempRefPtrChecker.cpp
rename : build/clang-plugin/TempRefPtrChecker.h => build/clang-plugin/alpha/TempRefPtrChecker.h
rename : build/clang-plugin/tests/TestTempRefPtr.cpp => build/clang-plugin/alpha/tests/TestTempRefPtr.cpp
extra : moz-landing-system : lando
2020-03-19 14:19:15 +00:00
Andi-Bogdan Postelnicu bc9dbe64a1 Bug 1619921 - enable clang-plugin with support for alpha checkers module. r=froydnj,sg
Differential Revision: https://phabricator.services.mozilla.com/D65314

--HG--
extra : moz-landing-system : lando
2020-03-17 07:01:09 +00:00
Andreea Pavel a6b6afe578 Backed out changeset 780399392e20 (bug 1619921) for breaking toolchains on a CLOSED TREE 2020-03-16 18:27:17 +02:00
Andi-Bogdan Postelnicu 1ee04a1f77 Bug 1619921 - enable clang-plugin with support for alpha checkers module. r=froydnj,sg
Differential Revision: https://phabricator.services.mozilla.com/D65314

--HG--
extra : moz-landing-system : lando
2020-03-16 16:04:00 +00:00
Boris Zbarsky c6c4a83796 Bug 1535530. Fix can-run-script analysis to not mishandle on-stack refs to RefPtrs. r=andi,masayuki
The key here is to test the type of the variable declaration for being a
smartptr type, instead of testing the type of the variable _use_.

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

--HG--
extra : moz-landing-system : lando
2020-03-06 09:57:45 +00:00
june wilde 98d786b85d Bug 1617991 - Add folder structure to import external static checks; r=andi,static-analysis-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D64193

--HG--
extra : moz-landing-system : lando
2020-03-05 16:29:13 +00:00
Kershaw Chang 238044b4a9 Bug 1615335 - Add TRR Background to ThreadAllows.txt r=valentin,andi
Differential Revision: https://phabricator.services.mozilla.com/D64950

--HG--
extra : moz-landing-system : lando
2020-03-04 09:20:52 +00:00
Csoregi Natalia f84d116559 Backed out 2 changesets (bug 1615335) for causing crashes (Bug 1619822). a=backout
Backed out changeset 521b0f9e84a3 (bug 1615335)
Backed out changeset a1dc4f624f16 (bug 1615335)
2020-03-04 09:20:18 +02:00
Sebastian Streich 882cb13c7b Bug 1611160 - Add Clang Plugin for nsIPrincipal r=ckerschb,andi
Differential Revision: https://phabricator.services.mozilla.com/D63082

--HG--
extra : moz-landing-system : lando
2020-03-03 14:30:36 +00:00
Kershaw Chang fb1afad459 Bug 1615335 - Add TRR Background to ThreadAllows.txt r=valentin,andi
Differential Revision: https://phabricator.services.mozilla.com/D64950

--HG--
extra : moz-landing-system : lando
2020-03-03 13:16:21 +00:00
Rob Lemley 1c3caf3c4d Bug 1618935 - Add named threads used by Thunderbird to ThreadAllows.txt. r=KrisWright
This is to fix build bustage until Thunderbird engineers are able to migrate
these threads to use background tasks.

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

--HG--
extra : moz-landing-system : lando
2020-02-28 18:23:15 +00:00
Mike Hommey 12dc985462 Bug 1618720 - Generate the ThreadAllow list deterministically. r=erahm,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D64690

--HG--
extra : moz-landing-system : lando
2020-02-28 00:41:47 +00:00
kriswright a9947c9768 Bug 1613440 - Add new clang plugin to deprecate NS_NewNamedThread r=andi
Creates a NoNewThreadsChecker plugin that looks for the function and checks to see if it's allowed.
-Creates two allowlists - `ThreadAllows.txt` is for thread names, while `ThreadFileAllows.txt` checks for entire files where instances of `NS_NewNamedThread` should be ignored.
-If an instance of `NS_NewNamedThread` is not listed in either list, then the checker throws an error with an additional note containing a more descriptive explanation of the failure.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 12:53:54 +00:00
Mike Hommey 06b9bd7de1 Bug 1617794 - Fix cross-building the clang-plugin for Windows targets. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D64296

--HG--
extra : moz-landing-system : lando
2020-02-27 04:42:27 +00:00
Dorel Luca da8c50fbdd Backed out changeset 459a77fff516 (bug 1613440) for Clang bustage on tools/extra/clang-tidy/mozilla/Utils.h. CLOSED TREE 2020-02-24 21:56:51 +02:00
kriswright acd0e7d09c Bug 1613440 - Add new clang plugin to deprecate NS_NewNamedThread r=andi
Creates a NoNewThreadsChecker plugin that looks for the function and checks to see if it's allowed.
-Creates two allowlists - `ThreadAllows.txt` is for thread names, while `ThreadFileAllows.txt` checks for entire files where instances of `NS_NewNamedThread` should be ignored.
-If an instance of `NS_NewNamedThread` is not listed in either list, then the checker throws an error with an additional note containing a more descriptive explanation of the failure.

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

--HG--
extra : moz-landing-system : lando
2020-02-22 00:35:40 +00:00
Mike Hommey 1b3a3daa80 Bug 1617131 - Sort the list of third party paths. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D63631

--HG--
extra : moz-landing-system : lando
2020-02-21 11:04:12 +00:00
Mike Shal c8abdd68c2 Bug 1616630 - Use py3_action for GENERATED_FILES that already support it; r=firefox-build-system-reviewers,kvark,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D63438

--HG--
extra : moz-landing-system : lando
2020-02-21 00:05:17 +00:00
Csoregi Natalia 6360b24e80 Backed out 2 changesets (bug 1616630) for Android bustage. CLOSED TREE
Backed out changeset 15016546c954 (bug 1616630)
Backed out changeset dcb7dc51633b (bug 1616630)
2020-02-20 21:24:11 +02:00
Mike Shal 39492660f4 Bug 1616630 - Use py3_action for GENERATED_FILES that already support it; r=firefox-build-system-reviewers,kvark,rstewart
Depends on D63437

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

--HG--
extra : moz-landing-system : lando
2020-02-20 16:21:55 +00:00
Mike Shal d8e4653d19 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 13:22:46 +00:00
Andi-Bogdan Postelnicu e67b41e3c7 Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63000

--HG--
extra : moz-landing-system : lando
2020-02-17 18:30:50 +00:00
Andreea Pavel ff331ccbb6 Backed out changeset 517de066cc6f (bug 1615826) for linting failures at CustomAttributes.cpp on a CLOSED TREE 2020-02-17 20:16:08 +02:00
Andi-Bogdan Postelnicu ac2806eae5 Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63000

--HG--
extra : moz-landing-system : lando
2020-02-17 17:23:16 +00:00
Andi-Bogdan Postelnicu 47700a0dea Bug 1615245 - checker `fopen-usage` should ignore some `gtest` include files. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62997

--HG--
extra : moz-landing-system : lando
2020-02-15 17:56:39 +00:00
Razvan Maries 90c44816ea Backed out changeset e56af64a3199 (bug 1615245) for build bustages on CustomMatchers.h. 2020-02-15 19:48:06 +02:00
Andi-Bogdan Postelnicu cadd1bc08a Bug 1615245 - checker `fopen-usage` should ignore some `gtest` include files. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62997

--HG--
extra : moz-landing-system : lando
2020-02-15 17:36:32 +00:00
Cosmin Sabou ff39f9206d Backed out 2 changesets (bug 1613263, bug 1611326) for presummably causing l10n langpack bustages. a=backout
Backed out changeset 77e54e76848a (bug 1611326)
Backed out changeset 36ba18ac3a68 (bug 1613263)
2020-02-14 15:02:21 +02:00
Mike Shal ad0c283ab2 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-13 23:07:04 +00:00
Brindusan Cristian e2fb6b8344 Backed out changeset 7fefed11f117 (bug 1611326) for build bustages at update-1.xpi.stub. CLOSED TREE 2020-02-13 23:33:34 +02:00
Mike Shal e6464dd404 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-13 20:31:50 +00:00
Masatoshi Kimura a5f89bc5bf Bug 1614840 - Fix fopen-usage checker so that it does not match wchar_t. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D62582

--HG--
extra : moz-landing-system : lando
2020-02-12 14:26:44 +00:00
Emilio Cobos Álvarez 42f94345f2 Bug 1613176 - Introduce NonTrivialTypeInFfiChecker. r=andi
This ensures that we don't pass non-trivially-copiable types through the FFI
boundary.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 13:11:29 +00:00
Andi-Bogdan Postelnicu 27d6c7c59b Bug 1391711 - Implement a static analysis checker to detect usages of fopen/ open like functions on win32 platform. r=sg
This is a re-work of `https://mzl.la/31Bkl47`, and because time passed and not all of the
issues reported by this checker were fixed and we want to land it, we've decided to move
from errors diagnostic messages to warnings.

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

--HG--
extra : moz-landing-system : lando
2020-02-10 14:41:26 +00:00
Andi-Bogdan Postelnicu eb2b106a8c Bug 1580260 - rework the logic for `MustReturnFromCaller` checker. r=froydnj
Starting with `Clang-10`, and in particular with `https://reviews.llvm.org/D66404`,
the `CFG` has been reflown in order to reduce discrepancies in destructor calls with
the actual codegen. This has also impacted the order of `CFGStmt` for `ReturnStmt`,
whereas now the AST children of the `ReturnStmt` have precedence other their parent
node.
The purpose of this patch is to fix this and add new supported cases for the `Expr`
that is generated from `ReturnStmt`.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 08:34:36 +00:00
Aaron Klotz 2977b8a690 Bug 1610678: Add check to clang plugin to raise error when `using namespace mozilla::java` is present in C++ source; r=andi
Differential Revision: https://phabricator.services.mozilla.com/D60611

--HG--
extra : moz-landing-system : lando
2020-01-22 18:47:04 +00:00
Simon Giesecke b7487e7d51 Bug 1609638 - Add analysis identifying dereferences of temporary RefPtr objects. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D60167

--HG--
extra : moz-landing-system : lando
2020-01-20 14:11:21 +00:00
shravanrn@gmail.com c9ff62b7ef Bug 1566288 - Port libGraphite usage in libThebes to use the RLBox API. r=froydnj,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D39593

--HG--
extra : moz-landing-system : lando
2019-12-19 16:05:35 +00:00
Brindusan Cristian 858cf4323e Backed out 2 changesets (bug 1569369, bug 1566288) for build bustages at rlbox_sandbox.hpp. CLOSED TREE
Backed out changeset 75d775daa792 (bug 1569369)
Backed out changeset 0bc20fd26ca0 (bug 1566288)
2019-12-18 13:53:56 +02:00
shravanrn@gmail.com 0eecffaee5 Bug 1566288 - Port libGraphite usage in libThebes to use the RLBox API. r=froydnj,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D39593

--HG--
extra : moz-landing-system : lando
2019-12-17 00:26:50 +00:00
Cosmin Sabou 1b479d118b Backed out changeset f5d00d265686 (bug 1566288) for causing build bustages.
--HG--
extra : amend_source : 4151f2dfb2775bbf1fa3255d47849a818eed5b6c
2019-12-12 20:57:57 +02:00
shravanrn@gmail.com c32b58ae0e Bug 1566288 - Port libGraphite usage in libThebes to use the RLBox API. r=froydnj,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D39593

--HG--
extra : moz-landing-system : lando
2019-12-12 02:48:11 +00:00
Andi-Bogdan Postelnicu e8a21331ce Bug 1598069 - make compliant with future clang 10 our clang based static analysis. r=froydnj
With clang 10 and up `getTemporary` has been replaced with the more versatile `getSubExpr`.
The commit that added this behaviour is: b0561b3346

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

--HG--
extra : moz-landing-system : lando
2019-11-21 14:07:44 +00:00
Andi-Bogdan Postelnicu 5392090016 Bug 1589096 - add registerPPCallbacks to our version of clang-tidy due to a limitation in mozilla-must-override. r=sylvestre
In the future we should re-write this checker but for now this solution is acceptable.

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

--HG--
extra : moz-landing-system : lando
2019-10-31 12:16:35 +00:00
Emilio Cobos Álvarez 25cb66e7e8 Bug 1332689 - Remove clang 3.9 compat code for the clang-plugin. r=andi
We require 4.0 to build since bug 1394825.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 06:55:00 +00:00
Emilio Cobos Álvarez bd45fba301 Bug 1332689 - Remove clang 3.8 compat code. r=andi
This is just drive-by, but it confused me. We require at least clang 4 to build
nowadays.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 06:54:43 +00:00
Emilio Cobos Álvarez ddabf6673b Bug 1591493 - Clang plugin should work with distributed builds. r=andi
sccache-dist / icecream preprocess the file and then send it to a builder.

That means that the file contains #line directives or equivalents in order for
diagnostics and such to work correctly.

Unfortunately our clang-plugin build fails catastrophically if you include a
third-party header, as it doesn't account for them.

Use SourceManager::getPresumedLoc to get filenames, as it accounts for them,
unlike just getFilename.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 06:54:25 +00:00
Ricky Stewart c010710916 Bug 1586358 - Replace existing instances of GENERATED_FILES with references to the GeneratedFile template r=firefox-build-system-reviewers,mshal
(Same content as bad revision https://phabricator.services.mozilla.com/D48230, but with a very small change to config/external/icu/data/moz.build to fix the build breakage.)

Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=833f6a69fcac689488a640b43e8e0bdaa086a56c

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

--HG--
extra : moz-landing-system : lando
2019-10-07 21:15:19 +00:00
Daniel Varga 052ef806b5 Backed out changeset 8d95f2c8867b (bug 1586358) for build bustage with FATAL ERROR PROCESSING MOZBUILD FILE. On a CLOSED TREE
--HG--
extra : rebase_source : 325fbad2455afc7f693087e75fa57dba79f4d86b
2019-10-07 20:22:08 +03:00
Ricky Stewart 940d91af38 Bug 1586358 - Replace existing instances of GENERATED_FILES with references to the GeneratedFile template r=nalexander
This patch doesn't remove all references to GENERATED_FILES, but does remove most of them, leaving only those which can't be trivially translated to the new template.

Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e4a25230c3992b9c5519ceb351fb37f6b2bf605e

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

--HG--
extra : moz-landing-system : lando
2019-10-07 15:31:05 +00:00
David Major 401c1780fa Bug 1583138 - Prepare clang-tidy for clang-9 r=andi
In clang 9, the signature of `registerPPCallbacks` changed and it no longer provides us a `CompilerInstance` [0]. I couldn't find a way to reach the `CompilerInstance` from the new structures, so I've inserted a level into the class hierarchy that mimics the old functionality.

With this patch, clang-tidy compiles with either clang-8 or clang-9, so we can land this independently in preparation for bug 1573211.

[0] For reference: the new signature was introduced in bbc89dcb29, the old overload was marked deprecated in e9087fe75c and removed in ee737a84d7.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 17:27:02 +00:00
Boris Zbarsky fa0ce4b209 Bug 1581315 part 1. Adjust MOZ_MUST_RETURN_FROM_CALLER to only apply to method calls on arguments. r=nika
It doesn't really make sense to enforce this behavior for calls on stack
variables (which presumably we then want to do something with) and doesn't
necessarily make sense to enforce it for member variables either.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 02:17:01 +00:00
Nathan Froyd 2ffed65f8f Bug 1577272 - annotate some refcounted lambda tests with expected errors for C++17; r=andi
clang produces these errors itself, but only in C++17 mode.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 06:40:49 +00:00
Andi-Bogdan Postelnicu 5fbdc1ea98 Bug 1579351 - Add constant complexity for MemMoveAnnotation when looking for specific `std::atomic`. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45027

--HG--
extra : moz-landing-system : lando
2019-09-09 13:30:16 +00:00
Andi-Bogdan Postelnicu ef2739a418 Bug 1569350 - Added more primitives to our static-analysis from MSVC 2019. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D44827

--HG--
extra : moz-landing-system : lando
2019-09-05 12:57:18 +00:00
Sylvestre Ledru 20b343675a Bug 1577726 - Move generated directories into a dedicated file (Generated.txt) from ThirdPartyPaths.txt r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D44147

--HG--
extra : moz-landing-system : lando
2019-09-05 14:24:21 +00:00
Andrew Sutherland dbbe7fbf1f Bug 1511025 - Correct searchfox template traversal. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D44755

--HG--
extra : moz-landing-system : lando
2019-09-05 07:17:57 +00:00
Tom Ritter 9dfb78cd80 Bug 1576710 - Perform the correct comparison with OS Arch r=nalexander
This removes an unrecognized parameter warning.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 18:58:51 +00:00
David Major 0db5cad5ae Bug 1574565 - Whitelist __cxx_atomic for memmove static analysis r=Ehsan
In some libstdc++ these appear in the inheritance hierarchy of __atomic_base, which is already whitelisted.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 23:01:03 +00:00
Mike Hommey 6e5fc78628 Bug 1570564 - Convert build-clang.py to python 3. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D40152
2019-08-02 19:06:20 +09:00
Sylvestre Ledru 2505df426c Bug 1566336 - Build clang from git rather than subversion. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D38361

MANUAL PUSH: avoid closing autoland while clang rebuilds.
2019-08-01 07:26:55 +09:00
Bogdan Tara 4f87c3bc2b Backed out changeset 4ba7a3e079e3 (bug 1566336) for static analysis bustage CLOSED TREE 2019-08-01 00:38:59 +03:00
Sylvestre Ledru 86692bad14 Bug 1566336 - Build clang from git rather than subversion. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D38361

MANUAL PUSH: avoid closing autoland while clang rebuilds.
2019-08-01 05:56:39 +09:00
Aaron Klotz 20bd2d4b30 Bug 1569681: Part 2 - Add new clang-plugin tests for moz_static_local_class and moz_trivial_destructor attributes; r=Ehsan
These tests are based on `moz_global_class` and `moz_trivial_ctor_dtor` tests,
respectively, but adapted for the semantics of the new attributes.

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

--HG--
rename : build/clang-plugin/tests/TestGlobalClass.cpp => build/clang-plugin/tests/TestStaticLocalClass.cpp
rename : build/clang-plugin/tests/TestTrivialCtorDtor.cpp => build/clang-plugin/tests/TestTrivialDtor.cpp
extra : moz-landing-system : lando
2019-07-30 18:50:54 +00:00
Aaron Klotz b21e723d2e Bug 1569681: Part 1 - Add support for moz_static_local_class and moz_trivial_dtor to clang-plugin; r=Ehsan
This patch is in support of adding a variant of Static{Auto,Ref}Ptr for use as
static locals, taking advantage of C++11 "magic statics" such that we can lazily
initialize those variables in a thread-safe way.

In support of those classes, this patch adds two new attributes:

* `moz_static_local_class` to ensure that any instantiations of that class only
  occur as static local variables;
* `moz_trivial_dtor` to ensure that these classes do not implicitly call `atexit`
  and add a whole bunch of shutdown crap.

`moz_static_local_class` works similarly to `moz_global_class`, except that its
object must only instantiate as static locals.

`TrivialDtorChecker` is based on `TrivialCtorDtorChecker`, with the ctor-specific
bits removed.

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

--HG--
rename : build/clang-plugin/TrivialCtorDtorChecker.cpp => build/clang-plugin/TrivialDtorChecker.cpp
rename : build/clang-plugin/TrivialCtorDtorChecker.h => build/clang-plugin/TrivialDtorChecker.h
extra : moz-landing-system : lando
2019-07-30 18:50:52 +00:00
Mihai Alexandru Michis fbddadbfab Backed out 3 changesets (bug 1569681) for causing build bustages. CLOSED TREE
Backed out changeset 292cc6853e82 (bug 1569681)
Backed out changeset 4d0a7b968eb0 (bug 1569681)
Backed out changeset be9e5f8f00d0 (bug 1569681)
2019-07-29 23:21:01 +03:00
Aaron Klotz b08dc4e5de Bug 1569681: Part 2 - Add new clang-plugin tests for moz_static_local_class and moz_trivial_destructor attributes; r=Ehsan
These tests are based on `moz_global_class` and `moz_trivial_ctor_dtor` tests,
respectively, but adapted for the semantics of the new attributes.

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

--HG--
rename : build/clang-plugin/tests/TestGlobalClass.cpp => build/clang-plugin/tests/TestStaticLocalClass.cpp
rename : build/clang-plugin/tests/TestTrivialCtorDtor.cpp => build/clang-plugin/tests/TestTrivialDtor.cpp
extra : moz-landing-system : lando
2019-07-29 20:10:22 +00:00
Aaron Klotz f6ac9f6aff Bug 1569681: Part 1 - Add support for moz_static_local_class and moz_trivial_dtor to clang-plugin; r=Ehsan
This patch is in support of adding a variant of Static{Auto,Ref}Ptr for use as
static locals, taking advantage of C++11 "magic statics" such that we can lazily
initialize those variables in a thread-safe way.

In support of those classes, this patch adds two new attributes:

* `moz_static_local_class` to ensure that any instantiations of that class only
  occur as static local variables;
* `moz_trivial_dtor` to ensure that these classes do not implicitly call `atexit`
  and add a whole bunch of shutdown crap.

`moz_static_local_class` works similarly to `moz_global_class`, except that its
object must only instantiate as static locals.

`TrivialDtorChecker` is based on `TrivialCtorDtorChecker`, with the ctor-specific
bits removed.

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

--HG--
rename : build/clang-plugin/TrivialCtorDtorChecker.cpp => build/clang-plugin/TrivialDtorChecker.cpp
rename : build/clang-plugin/TrivialCtorDtorChecker.h => build/clang-plugin/TrivialDtorChecker.h
extra : moz-landing-system : lando
2019-07-29 20:10:01 +00:00
Mihai Alexandru Michis ab5f499ef3 Backed out 3 changesets (bug 1569681) for causing build bustages. CLOSED TREE
Backed out changeset 075b818a46fe (bug 1569681)
Backed out changeset 2c543b239808 (bug 1569681)
Backed out changeset 21ea6fea046e (bug 1569681)
2019-07-29 22:53:13 +03:00
Aaron Klotz efde6ee120 Bug 1569681: Part 2 - Add new clang-plugin tests for moz_static_local_class and moz_trivial_destructor attributes; r=Ehsan
These tests are based on `moz_global_class` and `moz_trivial_ctor_dtor` tests,
respectively, but adapted for the semantics of the new attributes.

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

--HG--
rename : build/clang-plugin/tests/TestGlobalClass.cpp => build/clang-plugin/tests/TestStaticLocalClass.cpp
rename : build/clang-plugin/tests/TestTrivialCtorDtor.cpp => build/clang-plugin/tests/TestTrivialDtor.cpp
extra : moz-landing-system : lando
2019-07-29 19:38:24 +00:00
Aaron Klotz b802d4c147 Bug 1569681: Part 1 - Add support for moz_static_local_class and moz_trivial_dtor to clang-plugin; r=Ehsan
This patch is in support of adding a variant of Static{Auto,Ref}Ptr for use as
static locals, taking advantage of C++11 "magic statics" such that we can lazily
initialize those variables in a thread-safe way.

In support of those classes, this patch adds two new attributes:

* `moz_static_local_class` to ensure that any instantiations of that class only
  occur as static local variables;
* `moz_trivial_dtor` to ensure that these classes do not implicitly call `atexit`
  and add a whole bunch of shutdown crap.

`moz_static_local_class` works similarly to `moz_global_class`, except that its
object must only instantiate as static locals.

`TrivialDtorChecker` is based on `TrivialCtorDtorChecker`, with the ctor-specific
bits removed.

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

--HG--
rename : build/clang-plugin/TrivialCtorDtorChecker.cpp => build/clang-plugin/TrivialDtorChecker.cpp
rename : build/clang-plugin/TrivialCtorDtorChecker.h => build/clang-plugin/TrivialDtorChecker.h
extra : moz-landing-system : lando
2019-07-29 19:40:19 +00:00
Andi-Bogdan Postelnicu 782c64d21c Bug 1514801 - refactor clang based checker - KungFuDeathGripChecker. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D38187

--HG--
extra : moz-landing-system : lando
2019-07-17 05:05:30 +00:00
Sylvestre Ledru fc2eb5393c Bug 1562642 - Part 2 - Add missing MPL2 headers r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D37146

--HG--
extra : moz-landing-system : lando
2019-07-08 09:27:47 +00:00
David Major 88ae3f5fcb Bug 1557338 - Fix up TestSprintfLiteral.cpp for warnings on clang trunk r=andi
LLVM r356397 added some new warnings to the compiler that in this file complain about `size argument is too large; destination buffer has size 100, but size argument is 101`.

The easiest path is to just remove those lines; doing so doesn't really weaken the test coverage of the SprintfLiteral checker.

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

--HG--
extra : moz-landing-system : lando
2019-07-01 21:37:44 +00:00
Mihai Alexandru Michis a2163018a4 Backed out changeset 23973e3a5e95 (bug 1557338) for causing bustages on OS X Cross Compiled. CLOSED TREE 2019-07-02 00:30:06 +03:00
David Major 213d34fa80 Bug 1557338 - Fix up TestSprintfLiteral.cpp for warnings on clang trunk r=andi
LLVM r356397 added some new warnings to the compiler that in this file complain about `size argument is too large; destination buffer has size 100, but size argument is 101`.

The easiest path is to just remove those lines; doing so doesn't really weaken the test coverage of the SprintfLiteral checker.

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

--HG--
extra : moz-landing-system : lando
2019-07-01 18:32:34 +00:00
David Major 5827377048 Bug 1557313 - Update ExplicitOperatorBoolChecker.cpp for clang trunk changes r=andi
https://reviews.llvm.org/rL360311 reworked the handling of `explicit` in `CXXConversionDecl`, and the `isExplicitSpecified()` method no longer exists. We can instead use `isExplicit()` which conveniently works on both old and new clangs. (Before 360311, `isExplicit()` just forwarded to `isExplicitSpecified()`.)

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

--HG--
extra : moz-landing-system : lando
2019-06-06 15:42:25 +00:00
Andrew Sutherland 4e20ede87a Bug 1533802 - Sticky nesting for C++, Rust, JS r=kats
These are the changes from https://github.com/mozsearch/mozsearch/pull/212
(including the typo fixes requested today.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 20:49:34 +00:00
Yaron Tausky 7892bfc18a Bug 1554989 - Fix implicit checker on inheriting constructors r=andi
Inheriting constructors are implicitly introduced via a using-declaration.
Since the C++ grammar doesn't allow attributes on using-declarations, it
is currently impossible to add MOZ_IMPLICIT to implicit inheriting
constructors.

This commit changes the AST matcher such that it ignores inheriting
constructors altogether. If they are inheriting from an implicit inherited
constructor, that constructor's check should be enough to ensure that no
constructors are unintentionally implicit.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 11:36:46 +00:00
Mike Hommey 9454edbe38 Bug 1538060 - Update non-Windows builds to clang 8. r=froydnj
Windows builds have been taken care of in bug 1535441.

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

--HG--
rename : build/build-clang/clang-7-android.json => build/build-clang/clang-8-android.json
rename : build/build-clang/clang-7-linux64.json => build/build-clang/clang-8-linux64.json
rename : build/build-clang/clang-7-macosx64.json => build/build-clang/clang-8-macosx64.json
rename : build/build-clang/clang-trunk-mingw.json => build/build-clang/clang-8-mingw.json
rename : taskcluster/scripts/misc/build-clang-7-android.sh => taskcluster/scripts/misc/build-clang-8-android.sh
rename : taskcluster/scripts/misc/build-clang-7-linux-macosx-cross.sh => taskcluster/scripts/misc/build-clang-8-linux-macosx-cross.sh
rename : taskcluster/scripts/misc/build-clang-7-linux.sh => taskcluster/scripts/misc/build-clang-8-linux.sh
rename : taskcluster/scripts/misc/build-clang-trunk-mingw.sh => taskcluster/scripts/misc/build-clang-8-mingw.sh
extra : moz-landing-system : lando
2019-04-02 02:18:10 +00:00
Noemi Erli c479fa48df Backed out changeset 0d8cf467ed34 (bug 1538060) for Toolchains bustages CLOSED TREE
--HG--
rename : build/build-clang/clang-8-android.json => build/build-clang/clang-7-android.json
rename : build/build-clang/clang-8-linux64.json => build/build-clang/clang-7-linux64.json
rename : build/build-clang/clang-8-macosx64.json => build/build-clang/clang-7-macosx64.json
rename : build/build-clang/clang-8-mingw.json => build/build-clang/clang-trunk-mingw.json
rename : taskcluster/scripts/misc/build-clang-8-android.sh => taskcluster/scripts/misc/build-clang-7-android.sh
rename : taskcluster/scripts/misc/build-clang-8-linux-macosx-cross.sh => taskcluster/scripts/misc/build-clang-7-linux-macosx-cross.sh
rename : taskcluster/scripts/misc/build-clang-8-linux.sh => taskcluster/scripts/misc/build-clang-7-linux.sh
rename : taskcluster/scripts/misc/build-clang-8-mingw.sh => taskcluster/scripts/misc/build-clang-trunk-mingw.sh
2019-04-02 04:54:34 +03:00
Mike Hommey 0b2041f465 Bug 1538060 - Update non-Windows builds to clang 8. r=froydnj
Windows builds have been taken care of in bug 1535441.

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

--HG--
rename : build/build-clang/clang-7-android.json => build/build-clang/clang-8-android.json
rename : build/build-clang/clang-7-linux64.json => build/build-clang/clang-8-linux64.json
rename : build/build-clang/clang-7-macosx64.json => build/build-clang/clang-8-macosx64.json
rename : build/build-clang/clang-trunk-mingw.json => build/build-clang/clang-8-mingw.json
rename : taskcluster/scripts/misc/build-clang-7-android.sh => taskcluster/scripts/misc/build-clang-8-android.sh
rename : taskcluster/scripts/misc/build-clang-7-linux-macosx-cross.sh => taskcluster/scripts/misc/build-clang-8-linux-macosx-cross.sh
rename : taskcluster/scripts/misc/build-clang-7-linux.sh => taskcluster/scripts/misc/build-clang-8-linux.sh
rename : taskcluster/scripts/misc/build-clang-trunk-mingw.sh => taskcluster/scripts/misc/build-clang-8-mingw.sh
extra : moz-landing-system : lando
2019-04-01 12:23:13 +00:00
Sylvestre Ledru 04ccada040 Bug 1536790 - Also import clangTidyMPIModule when building the clang-plugin r=andi
Depends on D24175

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

--HG--
extra : moz-landing-system : lando
2019-04-01 12:24:37 +00:00
Ciure Andrei 8a67ec169a Backed out 3 changesets (bug 1538060, bug 1539779, bug 1536790) for causing clang-tidy bustages CLOSED TREE
Backed out changeset 7d058f3174e5 (bug 1538060)
Backed out changeset 8839622122ed (bug 1539779)
Backed out changeset 9eb7867c1dd4 (bug 1536790)

--HG--
rename : build/build-clang/clang-8-android.json => build/build-clang/clang-7-android.json
rename : build/build-clang/clang-8-linux64.json => build/build-clang/clang-7-linux64.json
rename : build/build-clang/clang-8-macosx64.json => build/build-clang/clang-7-macosx64.json
rename : build/build-clang/clang-8-mingw.json => build/build-clang/clang-trunk-mingw.json
rename : taskcluster/scripts/misc/build-clang-8-android.sh => taskcluster/scripts/misc/build-clang-7-android.sh
rename : taskcluster/scripts/misc/build-clang-8-linux-macosx-cross.sh => taskcluster/scripts/misc/build-clang-7-linux-macosx-cross.sh
rename : taskcluster/scripts/misc/build-clang-8-linux.sh => taskcluster/scripts/misc/build-clang-7-linux.sh
rename : taskcluster/scripts/misc/build-clang-8-mingw.sh => taskcluster/scripts/misc/build-clang-trunk-mingw.sh
2019-03-30 01:52:37 +02:00
Andreea Pavel e9856466cd Bug 1538060 - Update non-Windows builds to clang 8.
Summary: Windows builds have been taken care of in bug 1535441.

Reviewers: froydnj

Reviewed By: froydnj

Subscribers: froydnj, sylvestre, rjl

Bug #: 1538060

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

--HG--
rename : build/build-clang/clang-7-android.json => build/build-clang/clang-8-android.json
rename : build/build-clang/clang-7-linux64.json => build/build-clang/clang-8-linux64.json
rename : build/build-clang/clang-7-macosx64.json => build/build-clang/clang-8-macosx64.json
rename : build/build-clang/clang-trunk-mingw.json => build/build-clang/clang-8-mingw.json
rename : taskcluster/scripts/misc/build-clang-7-android.sh => taskcluster/scripts/misc/build-clang-8-android.sh
rename : taskcluster/scripts/misc/build-clang-7-linux-macosx-cross.sh => taskcluster/scripts/misc/build-clang-8-linux-macosx-cross.sh
rename : taskcluster/scripts/misc/build-clang-7-linux.sh => taskcluster/scripts/misc/build-clang-8-linux.sh
rename : taskcluster/scripts/misc/build-clang-trunk-mingw.sh => taskcluster/scripts/misc/build-clang-8-mingw.sh
extra : rebase_source : 4306240dd7bee404e83b6f0e651f4be0a1bfa165
extra : histedit_source : e569b2a5568d3aa2b9191b214947a8a11a3e06bf
2019-03-30 01:24:50 +02:00
Ciure Andrei 9fa2ff7bbe Backed out changeset dc3b81670b01 (bug 1538060) for causing clang-tidy bustages CLOSED TREE
--HG--
rename : build/build-clang/clang-8-android.json => build/build-clang/clang-7-android.json
rename : build/build-clang/clang-8-linux64.json => build/build-clang/clang-7-linux64.json
rename : build/build-clang/clang-8-macosx64.json => build/build-clang/clang-7-macosx64.json
rename : build/build-clang/clang-8-mingw.json => build/build-clang/clang-trunk-mingw.json
rename : taskcluster/scripts/misc/build-clang-8-android.sh => taskcluster/scripts/misc/build-clang-7-android.sh
rename : taskcluster/scripts/misc/build-clang-8-linux-macosx-cross.sh => taskcluster/scripts/misc/build-clang-7-linux-macosx-cross.sh
rename : taskcluster/scripts/misc/build-clang-8-linux.sh => taskcluster/scripts/misc/build-clang-7-linux.sh
rename : taskcluster/scripts/misc/build-clang-8-mingw.sh => taskcluster/scripts/misc/build-clang-trunk-mingw.sh
2019-03-30 00:36:40 +02:00
Mike Hommey 632b7eac9a Bug 1538060 - Update non-Windows builds to clang 8. r=froydnj
Windows builds have been taken care of in bug 1535441.

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

--HG--
rename : build/build-clang/clang-7-android.json => build/build-clang/clang-8-android.json
rename : build/build-clang/clang-7-linux64.json => build/build-clang/clang-8-linux64.json
rename : build/build-clang/clang-7-macosx64.json => build/build-clang/clang-8-macosx64.json
rename : build/build-clang/clang-trunk-mingw.json => build/build-clang/clang-8-mingw.json
rename : taskcluster/scripts/misc/build-clang-7-android.sh => taskcluster/scripts/misc/build-clang-8-android.sh
rename : taskcluster/scripts/misc/build-clang-7-linux-macosx-cross.sh => taskcluster/scripts/misc/build-clang-8-linux-macosx-cross.sh
rename : taskcluster/scripts/misc/build-clang-7-linux.sh => taskcluster/scripts/misc/build-clang-8-linux.sh
rename : taskcluster/scripts/misc/build-clang-trunk-mingw.sh => taskcluster/scripts/misc/build-clang-8-mingw.sh
extra : moz-landing-system : lando
2019-03-29 21:37:37 +00:00
Boris Zbarsky b49b18f7fb Bug 1539013. Teach MOZ_CAN_RUN_SCRIPT about taking pointers to live references. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D24840

--HG--
extra : moz-landing-system : lando
2019-03-26 20:55:41 +00:00
Boris Zbarsky 89dea017ae Bug 1539016 part 2. Teach MOZ_CAN_RUN_SCRIPT analysis about conditional operators. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D24839

--HG--
extra : moz-landing-system : lando
2019-03-26 20:56:36 +00:00
Boris Zbarsky 80a2c9c2db Bug 1539016 part 1. Refactor the MOZ_CAN_RUN_SCRIPT analysis a bit to make new live things easier to add. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D24838

--HG--
extra : moz-landing-system : lando
2019-03-26 20:56:16 +00:00
Boris Zbarsky 7d25b166ca Bug 1538030. Disable warning about dereferencing void* in can-run-script test. r=glandium
Some of our builds use --enable-warnings-as-errors and some don't, and I can't
figure out a way to write an expectation comment for that.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 03:25:51 +00:00
Boris Zbarsky ba49f4de45 Bug 1537537. Improve the MOZ_CAN_RUN_SCRIPT analysis reporting around invalid args. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D24258

--HG--
extra : moz-landing-system : lando
2019-03-21 11:52:50 +00:00
Boris Zbarsky 1e54f805f8 Bug 1536736. Allow constexpr things in the MOZ_CAN_RUN_SCRIPT analysis. r=andi
Since these are compile-time constants, they can't exactly go away on us due to
running script, right?

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

--HG--
extra : moz-landing-system : lando
2019-03-21 11:52:33 +00:00
Boris Zbarsky 534495abc4 Bug 1536825. Fix the interaction of ignoreTrivials and typechecks in MOZ_CAN_RUN_SCRIPT analysis. r=andi
We need to typecheck the trivials too, not just the final thing after trivials
are stripped, because casts are trivials.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 11:50:55 +00:00
Boris Zbarsky b25b0dd1a9 Bug 1536724. Consider a smartptr temporary to be live for MOZ_CAN_RUN_SCRIPT analysis purposes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D24120

--HG--
extra : moz-landing-system : lando
2019-03-21 11:49:11 +00:00
Boris Zbarsky 081fa29a04 Bug 1536719. Fix handling of member method calls in the MOZ_CAN_RUN_SCRIPT analysis. r=andi
The old code for member method calls did the following:

 1) Find the member method calls.
 2) Look at their "this" expression.
 3) If the "this" is an operator call, check for any of the arguments of the
    operator call being invalid.
 4) Otherwise (if not an operator call) check for the "this" value being
    invalid.

This wasn't right, because the "is invalid" check checks the type and only
considers refcounted things.  So if the code looked something like
"foo[i]->call_method()", we would look at the types of "foo" and "i" and
determine that none of those are refcounted types so there is nothing invalid
here (since "foo" is some sort of array type and "i" is an integer).  The new
setup just checks whether the "this" value is invalid, which does the type
check on the "this" value itself; in the "foo[i]->call_method()" case on
"foo[i]".  We then adjust the exclusions in InvalidArg to consider operator->
on known-live things valid, to allow the thing that we were really trying to
accomplish with the "check for an operator call" bits:
"stackRefPtr->some_method()".

The test coverage being added for the made-up TArray type is meant to catch
things like the geolocation issue that was being hidden by the buggy behavior.
I'm not using nsTArray itself because some header included by nsTArray.h
tries to define operator new/delete bits inline and that triggers warnings that
then cause a clang-plugin test failure, because they're unexpected.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 11:48:33 +00:00
Boris Zbarsky 640cb8470a Bug 1536336. Change MOZ_CAN_RUN_SCRIPT analysis to allow const members of "this" in addition to stack refptrs. r=andi
"this" is guaranteed to stay alive as long as other MOZ_CAN_RUN_SCRIPT
conditions hold, and its const members can't change value and drop
their refs.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 11:47:22 +00:00
Brindusan Cristian 044c3936c7 Backed out 6 changesets (bug 1536736, bug 1536336, bug 1536719, bug 1536825, bug 1537537, bug 1536724) for build bustages at TestCanRunScript. CLOSED TREE
Backed out changeset f754116e738e (bug 1537537)
Backed out changeset f9df48cfea43 (bug 1536736)
Backed out changeset 7a9888e700cf (bug 1536825)
Backed out changeset e2551303c5cf (bug 1536724)
Backed out changeset f497ce3b7419 (bug 1536719)
Backed out changeset fd59264c47c1 (bug 1536336)
2019-03-21 07:33:33 +02:00
Boris Zbarsky e3785e6699 Bug 1537537. Improve the MOZ_CAN_RUN_SCRIPT analysis reporting around invalid args. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D24258

--HG--
extra : moz-landing-system : lando
2019-03-20 20:04:13 +00:00
Boris Zbarsky 22b27ec802 Bug 1536736. Allow constexpr things in the MOZ_CAN_RUN_SCRIPT analysis. r=andi
Since these are compile-time constants, they can't exactly go away on us due to
running script, right?

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

--HG--
extra : moz-landing-system : lando
2019-03-20 20:04:11 +00:00
Boris Zbarsky 9679412967 Bug 1536825. Fix the interaction of ignoreTrivials and typechecks in MOZ_CAN_RUN_SCRIPT analysis. r=andi
We need to typecheck the trivials too, not just the final thing after trivials
are stripped, because casts are trivials.

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

--HG--
extra : moz-landing-system : lando
2019-03-20 15:25:55 +00:00
Boris Zbarsky 0d0978f826 Bug 1536724. Consider a smartptr temporary to be live for MOZ_CAN_RUN_SCRIPT analysis purposes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D24120

--HG--
extra : moz-landing-system : lando
2019-03-20 14:40:34 +00:00
Boris Zbarsky 14f6385d4b Bug 1536719. Fix handling of member method calls in the MOZ_CAN_RUN_SCRIPT analysis. r=andi
The old code for member method calls did the following:

 1) Find the member method calls.
 2) Look at their "this" expression.
 3) If the "this" is an operator call, check for any of the arguments of the
    operator call being invalid.
 4) Otherwise (if not an operator call) check for the "this" value being
    invalid.

This wasn't right, because the "is invalid" check checks the type and only
considers refcounted things.  So if the code looked something like
"foo[i]->call_method()", we would look at the types of "foo" and "i" and
determine that none of those are refcounted types so there is nothing invalid
here (since "foo" is some sort of array type and "i" is an integer).  The new
setup just checks whether the "this" value is invalid, which does the type
check on the "this" value itself; in the "foo[i]->call_method()" case on
"foo[i]".  We then adjust the exclusions in InvalidArg to consider operator->
on known-live things valid, to allow the thing that we were really trying to
accomplish with the "check for an operator call" bits:
"stackRefPtr->some_method()".

The test coverage being added for the made-up TArray type is meant to catch
things like the geolocation issue that was being hidden by the buggy behavior.
I'm not using nsTArray itself because some header included by nsTArray.h
tries to define operator new/delete bits inline and that triggers warnings that
then cause a clang-plugin test failure, because they're unexpected.

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

--HG--
extra : moz-landing-system : lando
2019-03-20 18:08:16 +00:00
Boris Zbarsky fd9223d7ac Bug 1536336. Change MOZ_CAN_RUN_SCRIPT analysis to allow const members of "this" in addition to stack refptrs. r=andi
"this" is guaranteed to stay alive as long as other MOZ_CAN_RUN_SCRIPT
conditions hold, and its const members can't change value and drop
their refs.

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

--HG--
extra : moz-landing-system : lando
2019-03-20 04:19:24 +00:00
Boris Zbarsky 5c13f9c06d Bug 1535124 part 1. Add a MOZ_KnownLive() around callback-typed arguments in bindings. r=qdot
This allows calling a C++ MOZ_CAN_RUN_SCRIPT method that takes a callback argument.

The changes to TestCanRunScript.cpp are there to catch an incorrect change I was
going to make to the analysis to make this work, until I figured out that
RootedCallback should be MOZ_IS_SMARTPTR_TO_REFCOUNTED.

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

--HG--
extra : moz-landing-system : lando
2019-03-19 12:59:53 +00:00
Boris Zbarsky e348ad0b6c Improve the documentation around the MOZ_CAN_RUN_SCRIPT analysis. No bug. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D23762

--HG--
extra : moz-landing-system : lando
2019-03-16 12:52:33 +00:00
Boris Zbarsky 135d0b832e Bug 1535651. Whitelist std::__pair_base as memmovable for static analysis purposes. r=emilio
In at least some libstdc++ versions, std::pair (which we want to be
memmovable) inherits from __pair_base.  We have a similar setup
already for __atomic_base.

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

--HG--
extra : moz-landing-system : lando
2019-03-15 16:17:52 +00:00
Boris Zbarsky f3173cde3f Bug 1534421. Fix the CAN_RUN_SCRIPT analysis to treat a deref of an arg as live if it would treat the arg as live. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D23071

--HG--
extra : moz-landing-system : lando
2019-03-13 12:13:08 +00:00
Boris Zbarsky b969a0f9f0 Bug 1534518. Change CanRunScriptChecker caller function note to point to the declaration, not the definition. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D23082

--HG--
extra : moz-landing-system : lando
2019-03-13 12:11:34 +00:00
Boris Zbarsky 4b76c0a954 Bug 1506439 part 1. Fix CanRunScript analysis handling of arguments that default to null. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D23064

--HG--
extra : moz-landing-system : lando
2019-03-13 02:33:57 +00:00