llvm-project/flang/test/Preprocessing/include-comment.F90
Peter Klausler 505f6da196
[flang] Ensure all warning/portability messages are guarded by Should… (#90518)
…Warn()

Many warning messages were being emitted unconditionally. Ensure that
all warnings are conditional on a true result from a call to
common::LanguageFeatureControl::ShouldWarn() so that it is easy for a
driver to disable them all, or, in the future, to provide per-warning
control over them.
2024-05-01 14:33:14 -07:00

19 lines
549 B
Fortran

! RUN: %flang -pedantic -I%S -E %s 2>&1 | FileCheck %s
! CHECK-NOT: :3:
#include <empty.h> ! comment
! CHECK-NOT: :5:
#include <empty.h> /* comment */
! CHECK-NOT: :7:
#include <empty.h> !comment
! CHECK: :9:10: portability: #include: extra stuff ignored after file name
#include <empty.h> comment
! CHECK-NOT: :11:
#include "empty.h" ! comment
! CHECK-NOT: :13:
#include "empty.h" /* comment */
! CHECK-NOT: :15:
#include "empty.h" !comment
! CHECK: :17:10: portability: #include: extra stuff ignored after file name
#include "empty.h" comment
end