diff options
| author | Koakuma <koachan@protonmail.com> | 2024-07-08 19:19:54 +0700 |
|---|---|---|
| committer | Koakuma <koachan@protonmail.com> | 2024-07-08 19:19:54 +0700 |
| commit | 5c4fdc2fd5898ebd9e89999a4f4b8aa289ca637f (patch) | |
| tree | f3b92a07f3dfc6e70f36d1000605f36a3c15af46 /flang/lib/Parser/provenance.cpp | |
| parent | dbda8e2f2cd8764e0badd983915d62a2c3377f4d (diff) | |
| parent | e9b8cd0c806db00f0981fb36717077c941426302 (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/koachan/spr/main.sparcias-enable-parseforallfeatures-in-matchoperandparserimpl
Created using spr 1.3.5
[skip ci]
Diffstat (limited to 'flang/lib/Parser/provenance.cpp')
| -rw-r--r-- | flang/lib/Parser/provenance.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/flang/lib/Parser/provenance.cpp b/flang/lib/Parser/provenance.cpp index 55ef67fd6288..6e2e7326e216 100644 --- a/flang/lib/Parser/provenance.cpp +++ b/flang/lib/Parser/provenance.cpp @@ -513,6 +513,16 @@ void CookedSource::Marshal(AllCookedSources &allCookedSources) { "(after end of source)")); data_ = buffer_.Marshal(); buffer_.clear(); + for (std::size_t ffStart : possibleFixedFormContinuations_) { + if (ffStart > 0 && ffStart + 1 < data_.size() && + data_[ffStart - 1] == '\n' && data_[ffStart] == ' ') { + // This fixed form include line is the first source line in an + // #include file (or after an empty one). Connect it with the previous + // source line by deleting its terminal newline. + data_[ffStart - 1] = ' '; + } + } + possibleFixedFormContinuations_.clear(); allCookedSources.Register(*this); } |
