[PATCH] D20632: clang-format: [JS] Support shebang lines on the very first line.

Martin Probst via cfe-commits cfe-commits at lists.llvm.org
Wed May 25 12:27:21 PDT 2016


mprobst added a comment.

How would I disable the formatting using that way?

When I special case `parsePreprocessorDirective()`, consume the line, and return `LT_ImportStatement`, clang-format still tries to format tokens within the shebang. E.g. I get `#!/usr/bin / env node`, note the whitespace after `bin`.

Turning the shebang into a comment seems like it has the advantage of being safe, its contents should simply never be touched.


http://reviews.llvm.org/D20632





More information about the cfe-commits mailing list