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

sameeran joshi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 01:58:34 PST 2021


sameeranjoshi 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
----------------
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
```



================
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
----------------
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.


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