[flang-commits] [clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Wed Feb 19 08:02:11 PST 2025
kiranchandramohan wrote:
> > > If the -fd-lines-as-code option is given they are treated as if the first column contained a blank.
> > > If the -fd-lines-as-comments option is given, they are treated as comment lines.
> >
> >
> > Do the tests added in this patch check this behaviour?
>
> Yes, if the source file is compiled with `-fd-lines-as-comments`, then line started with 'd' will be ignored as it is a comment and no error will be thrown with a duplicate `end` statement. If `-fd-lines-as-code` is provided, the character 'd' will be replaced by a blank and so the program can't compile because there's an error due to the present of 2 `end` statements.
Thanks. I wondered whether there is a better way to test this (by unparse or inspecting the output of `-E`). If possible do so, otherwise it is alrite.
https://github.com/llvm/llvm-project/pull/127605
More information about the flang-commits
mailing list