On Wed, Oct 11, 2017 at 11:45:54AM +0200, Emilio Cobos Álvarez wrote:
Hi,

I'm adding a header to the build, and I'm wondering: Can we use pragma once?

I don't see it anywhere in the build except third-party paths and:

 dom/svg/nsISVGPoint.h
 xpcom/io/nsAnonymousTemporaryFile.h

The last time I had this question, and didn't find the answer in [1], I found a fair number of (non-third-party) uses in m-c, including:

http://searchfox.org/mozilla-central/source/gfx/2d/unittest/TestBase.h#6
http://searchfox.org/mozilla-central/source/media/webrtc/signaling/src/common/CommonTypes.h#5
http://searchfox.org/mozilla-central/source/media/webrtc/signaling/src/common/NullDeleter.h#5
http://searchfox.org/mozilla-central/source/netwerk/wifi/win_wifiScanner.h#5
http://searchfox.org/mozilla-central/source/netwerk/wifi/win_wlanLibrary.h#7
http://searchfox.org/mozilla-central/source/toolkit/components/places/FaviconHelpers.h#7
...

If this genuinely causes problems in our build system, should we add linting/compile flags/static analysis to prevent its use?

[1]: https://developer.mozilla.org/en-US/docs/Using_CXX_in_Mozilla_code
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to