Bug 1730960 - Detect ambiguous preprocessor.py commands r=glandium
commit71e2c4ea64713cdd95b953280a2aba7a613aa524
authorserge-sans-paille <sguelton@mozilla.com>
Wed, 10 May 2023 07:26:13 +0000 (10 07:26 +0000)
committerserge-sans-paille <sguelton@mozilla.com>
Wed, 10 May 2023 07:26:13 +0000 (10 07:26 +0000)
tree5ca62fd900fa322c7d7d9a9b8e220285f775ebcc
parenta2b93397588df1fdfc4c8120e30ad3b74df5ed81
Bug 1730960 - Detect ambiguous preprocessor.py commands r=glandium

Because the preprocessor handles both comments in the form of

  # some comment

And commands in the form of

  #some command

And due to C preprocessor heritage, people tend to write

  # some command

which is considered a comment and not a command. Detect this situation
and generate an hard error when meeting such ambiguous commands.

Differential Revision: https://phabricator.services.mozilla.com/D176912
js/src/jit/MIROps.yaml
modules/libpref/init/StaticPrefList.yaml
python/mozbuild/mozbuild/preprocessor.py
python/mozbuild/mozbuild/test/test_preprocessor.py