[flang-commits] [flang] 338b478 - [flang] Do not print format tabs

V Donaldson via flang-commits flang-commits at lists.llvm.org
Wed Feb 23 20:03:15 PST 2022


Author: V Donaldson
Date: 2022-02-23T20:03:10-08:00
New Revision: 338b478e705fa3f7665739aa7adac27de593acc3

URL: https://github.com/llvm/llvm-project/commit/338b478e705fa3f7665739aa7adac27de593acc3
DIFF: https://github.com/llvm/llvm-project/commit/338b478e705fa3f7665739aa7adac27de593acc3.diff

LOG: [flang] Do not print format tabs

As an extension, tabs are accepted in a format, but should be skipped,
not printed.

Added: 
    

Modified: 
    flang/runtime/format.h

Removed: 
    


################################################################################
diff  --git a/flang/runtime/format.h b/flang/runtime/format.h
index 98c1136b0f519..56aa86bbe97c4 100644
--- a/flang/runtime/format.h
+++ b/flang/runtime/format.h
@@ -111,7 +111,9 @@ template <typename CONTEXT> class FormatControl {
   };
 
   void SkipBlanks() {
-    while (offset_ < formatLength_ && format_[offset_] == ' ') {
+    while (offset_ < formatLength_ &&
+        (format_[offset_] == ' ' || format_[offset_] == '\t' ||
+            format_[offset_] == '\v')) {
       ++offset_;
     }
   }


        


More information about the flang-commits mailing list