mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 23:49:22 +08:00
[flang] Fix another bug found in test.
Original-commit: flang-compiler/f18@7c5df7f3f8 Reviewed-on: https://github.com/flang-compiler/f18/pull/85
This commit is contained in:
@@ -704,28 +704,31 @@ const char *Prescanner::FixedFormContinuationLine() {
|
||||
return lineStart_ + 6;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
// Normal case: not in a compiler directive.
|
||||
if (col1 == '&') {
|
||||
// Extension: '&' as continuation marker
|
||||
if (warnOnNonstandardUsage_) {
|
||||
Say("nonstandard usage"_en_US, GetProvenance(lineStart_));
|
||||
} else {
|
||||
// Normal case: not in a compiler directive.
|
||||
if (col1 == '&') {
|
||||
// Extension: '&' as continuation marker
|
||||
if (warnOnNonstandardUsage_) {
|
||||
Say("nonstandard usage"_en_US, GetProvenance(lineStart_));
|
||||
}
|
||||
return lineStart_ + 1;
|
||||
}
|
||||
return lineStart_ + 1;
|
||||
}
|
||||
if (col1 == '\t' && lineStart_[1] >= '1' && lineStart_[1] <= '9') {
|
||||
tabInCurrentLine_ = true;
|
||||
return lineStart_ + 2; // VAX extension
|
||||
}
|
||||
if (col1 == ' ' && lineStart_[1] == ' ' && lineStart_[2] == ' ' &&
|
||||
lineStart_[3] == ' ' && lineStart_[4] == ' ') {
|
||||
char col6{lineStart_[5]};
|
||||
if (col6 != '\n' && col6 != '\t' && col6 != ' ' && col6 != '0') {
|
||||
return lineStart_ + 6;
|
||||
if (col1 == '\t' && lineStart_[1] >= '1' && lineStart_[1] <= '9') {
|
||||
tabInCurrentLine_ = true;
|
||||
return lineStart_ + 2; // VAX extension
|
||||
}
|
||||
if (col1 == ' ' && lineStart_[1] == ' ' && lineStart_[2] == ' ' &&
|
||||
lineStart_[3] == ' ' && lineStart_[4] == ' ') {
|
||||
char col6{lineStart_[5]};
|
||||
if (col6 != '\n' && col6 != '\t' && col6 != ' ' && col6 != '0') {
|
||||
return lineStart_ + 6;
|
||||
}
|
||||
}
|
||||
if (delimiterNesting_ > 0) {
|
||||
if (col1 != '!' && col1 != '*' && col1 != 'C' && col1 != 'c') {
|
||||
return lineStart_;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (delimiterNesting_ > 0) {
|
||||
return lineStart_;
|
||||
}
|
||||
return nullptr; // not a continuation line
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user