You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mozcpp: refresh the list of Mozilla annotation macros #1267
tree-sitter-mozcpp handles this for Mozilla code with a hard-coded list of annotation macros (macro_annotation in tree-sitter-mozcpp/grammar.js). That list hasn't been updated in years. Several macros on it no longer exist in mozilla-central (MOZ_MUST_USE, MOZ_FALLTHROUGH, MOZ_ASAN_BLACKLIST, ...). They're harmless to keep for older code, but many annotation macros added since are missing. Every one of these currently produces an ERROR node:
They're widely used: GitHub code search finds MOZ_UNANNOTATED, MOZ_RUNINIT and MFBT_API in 100–200 files each. NS_NO_VTABLE is also in every generated XPIDL header.
Object-like macros from mfbt/Attributes.h, mfbt/Types.h, mfbt/MemoryChecking.h, mfbt/ThreadSafety.h, xpcom/base/nscore.h and js/src/jstypes.h that expand to an attribute, __declspec or visibility specifier, and are missing from the list:
Not included on purpose: macros that expand to a type (NS_IMETHOD, NS_IMETHODIMP), calling conventions that sit after the return type (NS_FASTCALL, NS_STDCALL, ...), feature tests (MOZ_HAVE_*), and function-like macros (MOZ_GUARDED_BY(...), ...).
Activity