[flang-commits] [PATCH] D143824: [flang] Fix new assertion failure
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Feb 13 07:35:32 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG95526930da6c: [flang] Fix new assertion failure (authored by klausler).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143824/new/
https://reviews.llvm.org/D143824
Files:
flang/lib/Parser/token-sequence.cpp
Index: flang/lib/Parser/token-sequence.cpp
===================================================================
--- flang/lib/Parser/token-sequence.cpp
+++ flang/lib/Parser/token-sequence.cpp
@@ -264,8 +264,10 @@
}
void TokenSequence::Emit(CookedSource &cooked) const {
- cooked.Put(&char_[0], char_.size());
- cooked.PutProvenanceMappings(provenances_);
+ if (auto n{char_.size()}) {
+ cooked.Put(&char_[0], n);
+ cooked.PutProvenanceMappings(provenances_);
+ }
}
llvm::raw_ostream &TokenSequence::Dump(llvm::raw_ostream &o) const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143824.496983.patch
Type: text/x-patch
Size: 551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230213/d885e094/attachment.bin>
More information about the flang-commits
mailing list