[PATCH] D94782: [flang][driver] Make the driver report diagnostics from the prescanner

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 09:27:55 PST 2021


awarzynski marked an inline comment as done.
awarzynski added inline comments.


================
Comment at: flang/test/Frontend/preprocessor-diag.f90:7
+
+! ERROR: :8:20: #include: extra stuff ignored after file name
+#include <empty.h> comment
----------------
sameeranjoshi wrote:
> kiranchandramohan wrote:
> > Is the filename missing here? Can the driver preprocess and emit multiple files.
> Here's how it looks for multiple files.
> I tried with `f18` and not `flang-new`, with this patch I think both should ideally show the same output(at least it is supposed to).
> 
> ```
> temp.f90:2:20: #include: extra stuff ignored after file name
>   #include <empty.h> <empty.h> comment
>                                      ^^^^^^^^^^^^^^
> temp.f90:4:20: #include: extra stuff ignored after file name
>   #include "empty.h" <empty.h> comment
>                                   ^^^^^^^^^^^^^^
> end
> ```
> 
@sameeranjoshi Thank you for checking this! I've added the file name there. Both `f18` and `flang-new` behave consistently here.


================
Comment at: flang/test/Frontend/preprocessor-diag.f90:9
+#include <empty.h> comment
+! ERROR: :10:20: #include: extra stuff ignored after file name
+#include "empty.h" comment
----------------
sameeranjoshi wrote:
> I discovered just now that the output isn't a error but seems like a warning.
> I feel using `--check-prefix=WARNING` would be correct.
Good point, thank you! I'm hesitant to use `WARNING`, as there is nothing that it would indicate that it's actually a warning. FWIW, it's just a diagnostic message without any severity attached to it.

Are you OK with regular `CHECK` ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94782/new/

https://reviews.llvm.org/D94782



More information about the llvm-commits mailing list