| 1 |
! Test that the driver correctly reports diagnostics from the prescanner, no |
| 2 |
! matter what driver action/phase is run. We need this test as Flang currently |
| 3 |
! has no central API for managing the diagnostics. For this reason the driver |
| 4 |
! needs to make sure that the diagnostics are indeed issued (rather that relying |
| 5 |
! on some DiagnosticsEngine). |
| 6 |
|
| 7 |
! Test with -E (i.e. PrintPreprocessedAction, stops after prescanning) |
| 8 |
! RUN: %flang -pedantic -E -I %S/Inputs/ %s 2>&1 | FileCheck %s |
| 9 |
! RUN: %flang_fc1 -pedantic -E -I %S/Inputs/ %s 2>&1 | FileCheck %s |
| 10 |
|
| 11 |
! Test with -fsyntax-only (i.e. ParseSyntaxOnlyAction, stops after semantic checks) |
| 12 |
! RUN: %flang -pedantic -fsyntax-only -I %S/Inputs/ %s 2>&1 | FileCheck %s |
| 13 |
! RUN: %flang_fc1 -pedantic -fsyntax-only -I %S/Inputs/ %s 2>&1 | FileCheck %s |
| 14 |
|
| 15 |
! CHECK: prescanner-diag.f90:[[#@LINE+3]]:10: portability: #include: extra stuff ignored after file name |
| 16 |
! CHECK: prescanner-diag.f90:[[#@LINE+3]]:10: portability: #include: extra stuff ignored after file name |
| 17 |
|
| 18 |
#include <empty.h> comment |
| 19 |
#include "empty.h" comment |
| 20 |
end |