[clang] 8025c03 - [clang-format] Top-level unwrapped lines don't follow a left brace
    via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed Sep 15 14:53:10 PDT 2021
    
    
  
Author: owenca
Date: 2021-09-15T14:52:07-07:00
New Revision: 8025c03f70ee9b92e8599519b5ee34b54c9a80da
URL: https://github.com/llvm/llvm-project/commit/8025c03f70ee9b92e8599519b5ee34b54c9a80da
DIFF: https://github.com/llvm/llvm-project/commit/8025c03f70ee9b92e8599519b5ee34b54c9a80da.diff
LOG: [clang-format] Top-level unwrapped lines don't follow a left brace
Differential Revision: https://reviews.llvm.org/D109752
Added: 
    
Modified: 
    clang/lib/Format/UnwrappedLineParser.cpp
Removed: 
    
################################################################################
diff  --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index 18dc5c424470..d629a20fb089 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -431,7 +431,7 @@ void UnwrappedLineParser::parseLevel(bool HasOpeningBrace) {
       }
       LLVM_FALLTHROUGH;
     default:
-      parseStructuralElement(/*IsTopLevel=*/true);
+      parseStructuralElement(!HasOpeningBrace);
       break;
     }
   } while (!eof());
        
    
    
More information about the cfe-commits
mailing list