From 21692a6d76dc578561e1d224c9f9b693538dcb2a Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 12 Sep 2024 15:41:40 +0200 Subject: [PATCH] [Clang][NFC] Remove trailing whitespace from clang/tools/libclang/CXStoredDIagnostic.cpp --- clang/tools/libclang/CXStoredDiagnostic.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/clang/tools/libclang/CXStoredDiagnostic.cpp b/clang/tools/libclang/CXStoredDiagnostic.cpp index c4c24876e70de4..03018229549bd4 100644 --- a/clang/tools/libclang/CXStoredDiagnostic.cpp +++ b/clang/tools/libclang/CXStoredDiagnostic.cpp @@ -33,14 +33,14 @@ CXDiagnosticSeverity CXStoredDiagnostic::getSeverity() const { case DiagnosticsEngine::Error: return CXDiagnostic_Error; case DiagnosticsEngine::Fatal: return CXDiagnostic_Fatal; } - + llvm_unreachable("Invalid diagnostic level"); } CXSourceLocation CXStoredDiagnostic::getLocation() const { if (Diag.getLocation().isInvalid()) return clang_getNullLocation(); - + return translateSourceLocation(Diag.getLocation().getManager(), LangOpts, Diag.getLocation()); } @@ -57,7 +57,7 @@ CXString CXStoredDiagnostic::getDiagnosticOption(CXString *Disable) const { *Disable = cxstring::createDup((Twine("-Wno-") + Option).str()); return cxstring::createDup((Twine("-W") + Option).str()); } - + if (ID == diag::fatal_too_many_errors) { if (Disable) *Disable = cxstring::createRef("-ferror-limit=0"); @@ -79,7 +79,7 @@ CXString CXStoredDiagnostic::getCategoryText() const { unsigned CXStoredDiagnostic::getNumRanges() const { if (Diag.getLocation().isInvalid()) return 0; - + return Diag.range_size(); } @@ -92,12 +92,12 @@ CXSourceRange CXStoredDiagnostic::getRange(unsigned int Range) const { unsigned CXStoredDiagnostic::getNumFixIts() const { if (Diag.getLocation().isInvalid()) - return 0; + return 0; return Diag.fixit_size(); } CXString CXStoredDiagnostic::getFixIt(unsigned FixIt, - CXSourceRange *ReplacementRange) const { + CXSourceRange *ReplacementRange) const { const FixItHint &Hint = Diag.fixit_begin()[FixIt]; if (ReplacementRange) { // Create a range that covers the entire replacement (or @@ -108,4 +108,3 @@ CXString CXStoredDiagnostic::getFixIt(unsigned FixIt, } return cxstring::createDup(Hint.CodeToInsert); } -