5dd8e020b762283688a9b4108be024d8e8ec1c97
AttributeMacros to .clang-format r=sylvestre
C++ technically allows the construct `struct foo bar{}` as an
initialization: "struct foo" (a C-ism) is the type name, while "bar" is
the variable name and "{}" is the brace-initialization.
This construct should be formatted in a completely different way than
the type-declaration `struct FOO bar {}`: here "FOO" is a macro that
expands to an `__attribute__((...)))` definition or a comment, "bar" is
the type name, and "{}" is the class body.
These constructs are formally ambiguous at the level of a code formatter
without access to macro-expansion and the like. Unfortunately, after
years of assuming that the intended construct -- common in C++ codebases
like, say, Gecko -- is the latter, clang-format has suddenly decided to
assume instead that it's the former. [1]
To preserve the previous formatter behavior, add the `AttributeMacros`
option to our `.clang-format`, starting it off with a list of all the
attribute-macro names from mfbt/Attributes.h which are marked as
applying to classes.
[1] https://github.com/llvm/llvm-project/issues/94184
Differential Revision: https://phabricator.services.mozilla.com/D231824
…
Bug
1936090: Show/Hide Unified Search Button dependent on pageproxystate r=desktop-theme-reviewers,tabbrowser-reviewers,daleharvey
…
Bug
1240005 - Users of do_CreateInstance or InitWithNativePath/InitWithPath not checking return value r=necko-reviewers,xpcom-reviewers,media-playback-reviewers,emilio,karlt,valentin
…
…
…
…
…
…
…
An explanation of the Firefox Source Code Directory Structure and links to
project pages with documentation can be found at:
https://firefox-source-docs.mozilla.org/contributing/directory_structure.html
For information on how to build Firefox from the source code and create the patch see:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
If you have a question about developing Firefox, and can't find the solution
on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.
Nightly development builds can be downloaded from:
https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
- or -
https://www.mozilla.org/firefox/channel/desktop/#nightly
Keep in mind that nightly builds, which are used by Firefox developers for
testing, may be buggy.
Description
Languages
JavaScript
32.6%
C++
25.1%
HTML
20.9%
C
10.6%
Python
2.8%
Other
7.6%