diff options
author | peter klausler <pklausler@nvidia.com> | 2020-09-14 14:09:01 -0700 |
---|---|---|
committer | peter klausler <pklausler@nvidia.com> | 2020-09-14 16:58:14 -0700 |
commit | 4706880f06fbaf5f95dab2b6fd4cd2a5cf1693e6 (patch) | |
tree | dd61878ac04a2dca599404dd8b3f4417ee8be5ce /flang/test | |
parent | e6bc7037d386184d94bf68b184d0ac62b96a4098 (diff) | |
download | llvm-4706880f06fbaf5f95dab2b6fd4cd2a5cf1693e6.zip llvm-4706880f06fbaf5f95dab2b6fd4cd2a5cf1693e6.tar.gz llvm-4706880f06fbaf5f95dab2b6fd4cd2a5cf1693e6.tar.bz2 |
[flang] Allow Fortran comments after #include path
C-style /*comments*/ are removed during preprocessing directive
tokenization, but Fortran !comments need to be specifically
allowed.
Fixes LLVM bugzilla 47466.
Differential Revision: https://reviews.llvm.org/D87638
Diffstat (limited to 'flang/test')
-rw-r--r-- | flang/test/Preprocessing/empty.h | 0 | ||||
-rw-r--r-- | flang/test/Preprocessing/include-comment.F90 | 18 |
2 files changed, 18 insertions, 0 deletions
diff --git a/flang/test/Preprocessing/empty.h b/flang/test/Preprocessing/empty.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/flang/test/Preprocessing/empty.h diff --git a/flang/test/Preprocessing/include-comment.F90 b/flang/test/Preprocessing/include-comment.F90 new file mode 100644 index 0000000..6ac475f --- /dev/null +++ b/flang/test/Preprocessing/include-comment.F90 @@ -0,0 +1,18 @@ +! RUN: %f18 -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:20: #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:20: #include: extra stuff ignored after file name +#include "empty.h" comment +end |