[clang] 5c60e2c - [clang-format][NFC] Reformat source code with clang-format style

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 30 20:19:40 PST 2023


Author: Owen Pan
Date: 2023-11-30T20:19:30-08:00
New Revision: 5c60e2ce78e79c2d15152e08d9e28fcf3a1d4e51

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

LOG: [clang-format][NFC] Reformat source code with clang-format style

Added: 
    

Modified: 
    clang/include/clang/Format/.clang-format
    clang/lib/Format/.clang-format
    clang/lib/Format/UnwrappedLineParser.cpp
    clang/tools/clang-format/.clang-format
    clang/tools/clang-format/ClangFormat.cpp
    clang/unittests/Format/.clang-format

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Format/.clang-format b/clang/include/clang/Format/.clang-format
index 63d45e0307a3dfe..d7331b3c8cf02ef 100644
--- a/clang/include/clang/Format/.clang-format
+++ b/clang/include/clang/Format/.clang-format
@@ -1,5 +1 @@
-BasedOnStyle: LLVM
-InsertBraces: true
-InsertNewlineAtEOF: true
-LineEnding: LF
-RemoveBracesLLVM: true
+BasedOnStyle: clang-format

diff  --git a/clang/lib/Format/.clang-format b/clang/lib/Format/.clang-format
index 63d45e0307a3dfe..d7331b3c8cf02ef 100644
--- a/clang/lib/Format/.clang-format
+++ b/clang/lib/Format/.clang-format
@@ -1,5 +1 @@
-BasedOnStyle: LLVM
-InsertBraces: true
-InsertNewlineAtEOF: true
-LineEnding: LF
-RemoveBracesLLVM: true
+BasedOnStyle: clang-format

diff  --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index 9a9a16a3caaca8b..57126b8dfeac5de 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -47,8 +47,7 @@ void printLine(llvm::raw_ostream &OS, const UnwrappedLine &Line,
       OS << Prefix;
       NewLine = false;
     }
-    OS << I->Tok->Tok.getName() << "["
-       << "T=" << (unsigned)I->Tok->getType()
+    OS << I->Tok->Tok.getName() << "[" << "T=" << (unsigned)I->Tok->getType()
        << ", OC=" << I->Tok->OriginalColumn << ", \"" << I->Tok->TokenText
        << "\"] ";
     for (SmallVectorImpl<UnwrappedLine>::const_iterator

diff  --git a/clang/tools/clang-format/.clang-format b/clang/tools/clang-format/.clang-format
index 63d45e0307a3dfe..d7331b3c8cf02ef 100644
--- a/clang/tools/clang-format/.clang-format
+++ b/clang/tools/clang-format/.clang-format
@@ -1,5 +1 @@
-BasedOnStyle: LLVM
-InsertBraces: true
-InsertNewlineAtEOF: true
-LineEnding: LF
-RemoveBracesLLVM: true
+BasedOnStyle: clang-format

diff  --git a/clang/tools/clang-format/ClangFormat.cpp b/clang/tools/clang-format/ClangFormat.cpp
index cb6e7460a66ecb7..829f85b93bc73cb 100644
--- a/clang/tools/clang-format/ClangFormat.cpp
+++ b/clang/tools/clang-format/ClangFormat.cpp
@@ -330,8 +330,7 @@ static void outputReplacementXML(StringRef Text) {
 
 static void outputReplacementsXML(const Replacements &Replaces) {
   for (const auto &R : Replaces) {
-    outs() << "<replacement "
-           << "offset='" << R.getOffset() << "' "
+    outs() << "<replacement " << "offset='" << R.getOffset() << "' "
            << "length='" << R.getLength() << "'>";
     outputReplacementXML(R.getReplacementText());
     outs() << "</replacement>\n";

diff  --git a/clang/unittests/Format/.clang-format b/clang/unittests/Format/.clang-format
index 63d45e0307a3dfe..d7331b3c8cf02ef 100644
--- a/clang/unittests/Format/.clang-format
+++ b/clang/unittests/Format/.clang-format
@@ -1,5 +1 @@
-BasedOnStyle: LLVM
-InsertBraces: true
-InsertNewlineAtEOF: true
-LineEnding: LF
-RemoveBracesLLVM: true
+BasedOnStyle: clang-format


        


More information about the cfe-commits mailing list