[PATCH] D82687: [flang] Fix line continuation after bare labels (fm200.f)
Peter Klausler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 26 15:10:43 PDT 2020
klausler created this revision.
klausler added reviewers: tskeith, PeteSteinfeld, sscalpone.
klausler added a project: Flang.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
klausler updated this revision to Diff 273840.
klausler added a comment.
Rename function.
Fixed-form line continuation was not working when the
preceding line was a bare label.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D82687
Files:
flang/lib/Parser/prescan.cpp
flang/lib/Parser/prescan.h
Index: flang/lib/Parser/prescan.h
===================================================================
--- flang/lib/Parser/prescan.h
+++ flang/lib/Parser/prescan.h
@@ -147,6 +147,7 @@
void SkipToEndOfLine();
bool MustSkipToEndOfLine() const;
void NextChar();
+ void SkipToNextSignificantCharacter();
void SkipCComments();
void SkipSpaces();
static const char *SkipWhiteSpace(const char *);
Index: flang/lib/Parser/prescan.cpp
===================================================================
--- flang/lib/Parser/prescan.cpp
+++ flang/lib/Parser/prescan.cpp
@@ -272,6 +272,7 @@
token.CloseToken();
}
}
+ SkipToNextSignificantCharacter();
}
void Prescanner::SkipToEndOfLine() {
@@ -298,6 +299,14 @@
at_ += 3;
encoding_ = Encoding::UTF_8;
}
+ SkipToNextSignificantCharacter();
+}
+
+// Skip everything that should be ignored until the next significant
+// character is reached; handles C-style comments in preprocessing
+// directives, Fortran ! comments, stuff after the right margin in
+// fixed form, and all forms of line continuation.
+void Prescanner::SkipToNextSignificantCharacter() {
if (inPreprocessorDirective_) {
SkipCComments();
} else {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82687.273840.patch
Type: text/x-patch
Size: 1215 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200626/6728bc91/attachment.bin>
More information about the llvm-commits
mailing list