[libcxx-commits] [libcxx] a5b9b69 - [libc++] Add InsertNewlineAtEOF=True to .clang-format (#214078)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 5 01:20:27 PDT 2026


Author: Michael G. Kazakov
Date: 2026-08-05T08:20:21Z
New Revision: a5b9b6900655feea616ee2337920b85709d9757d

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

LOG: [libc++] Add InsertNewlineAtEOF=True to .clang-format (#214078)

Newline at the end of a file is a standard convention in the `libc++`
codebase, but it's not enforced via `clang-format`.
Current PR enables this check:

https://clang.llvm.org/docs/ClangFormatStyleOptions.html#insertnewlineateof

Added: 
    

Modified: 
    libcxx/.clang-format
    libcxxabi/.clang-format

Removed: 
    


################################################################################
diff  --git a/libcxx/.clang-format b/libcxx/.clang-format
index c99c535fe0ce1..42a7238dd8386 100644
--- a/libcxx/.clang-format
+++ b/libcxx/.clang-format
@@ -63,6 +63,7 @@ EmptyLineAfterAccessModifier: Never
 EmptyLineBeforeAccessModifier: Always
 IndentWrappedFunctionNames: false
 IndentRequires: true
+InsertNewlineAtEOF: true
 InsertTrailingCommas: Wrapped
 KeepEmptyLinesAtTheStartOfBlocks: false
 MaxEmptyLinesToKeep: 1

diff  --git a/libcxxabi/.clang-format b/libcxxabi/.clang-format
index c99c535fe0ce1..42a7238dd8386 100644
--- a/libcxxabi/.clang-format
+++ b/libcxxabi/.clang-format
@@ -63,6 +63,7 @@ EmptyLineAfterAccessModifier: Never
 EmptyLineBeforeAccessModifier: Always
 IndentWrappedFunctionNames: false
 IndentRequires: true
+InsertNewlineAtEOF: true
 InsertTrailingCommas: Wrapped
 KeepEmptyLinesAtTheStartOfBlocks: false
 MaxEmptyLinesToKeep: 1


        


More information about the libcxx-commits mailing list