From: David Blaikie Date: Wed, 19 Nov 2014 05:48:40 +0000 (+0000) Subject: clang-format a recent commit I made X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8945a699131159a70cc74a6a14f6d888517a6582;p=clang clang-format a recent commit I made git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222317 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h index 50f9b88998..ed923393c8 100644 --- a/include/clang/Basic/IdentifierTable.h +++ b/include/clang/Basic/IdentifierTable.h @@ -494,7 +494,7 @@ public: // Make sure getName() knows how to find the IdentifierInfo // contents. II->Entry = &Entry; - + // If this is the 'import' contextual keyword, mark it as such. if (Name.equals("import")) II->setModulesImport(true); diff --git a/lib/ARCMigrate/ObjCMT.cpp b/lib/ARCMigrate/ObjCMT.cpp index 4ad961c31f..af9c472550 100644 --- a/lib/ARCMigrate/ObjCMT.cpp +++ b/lib/ARCMigrate/ObjCMT.cpp @@ -102,7 +102,7 @@ public: llvm::SmallPtrSet ObjCProtocolDecls; llvm::SmallVector CFFunctionIBCandidates; llvm::StringSet<> WhiteListFilenames; - + ObjCMigrateASTConsumer(StringRef migrateDir, unsigned astMigrateActions, FileRemapper &remapper, diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 7462f96e51..a6f2d6cfe5 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -2606,7 +2606,7 @@ CodeGenModule::GetAddrOfConstantString(const StringLiteral *Literal) { unsigned StringLength = 0; llvm::StringMapEntry &Entry = GetConstantStringEntry(CFConstantStringMap, Literal, StringLength); - + if (auto *C = Entry.second) return C; @@ -2680,8 +2680,8 @@ CodeGenModule::GetAddrOfConstantString(const StringLiteral *Literal) { // String pointer. llvm::Constant *C = - llvm::ConstantDataArray::getString(VMContext, Entry.first()); - + llvm::ConstantDataArray::getString(VMContext, Entry.first()); + llvm::GlobalValue::LinkageTypes Linkage; bool isConstant; Linkage = llvm::GlobalValue::PrivateLinkage; @@ -2713,7 +2713,7 @@ CodeGenModule::GetAddrOfConstantString(const StringLiteral *Literal) { ? NSStringNonFragileABISection : NSStringSection); Entry.second = GV; - + return GV; } diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp index 259fbd57bb..6345e75708 100644 --- a/lib/Lex/HeaderSearch.cpp +++ b/lib/Lex/HeaderSearch.cpp @@ -790,7 +790,7 @@ const FileEntry *HeaderSearch::LookupFile( return MSFE; } - LookupFileCacheInfo &CacheLookup = LookupFileCache[Filename]; + LookupFileCacheInfo &CacheLookup = LookupFileCache[Filename]; CacheLookup.HitIdx = LookupFileCache[ScratchFilename].HitIdx; // FIXME: SuggestedModule. return FE; diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index c0866432e6..4733b0b54b 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -587,12 +587,12 @@ Sema::ActOnCXXThrow(Scope *S, SourceLocation OpLoc, Expr *Ex) { // When certain criteria are met, an implementation is allowed to omit the // copy/move construction of a class object [...] // - // - in a throw-expression, when the operand is the name of a + // - in a throw-expression, when the operand is the name of a // non-volatile automatic object (other than a function or catch- // clause parameter) whose scope does not extend beyond the end of the - // innermost enclosing try-block (if there is one), the copy/move - // operation from the operand to the exception object (15.1) can be - // omitted by constructing the automatic object directly into the + // innermost enclosing try-block (if there is one), the copy/move + // operation from the operand to the exception object (15.1) can be + // omitted by constructing the automatic object directly into the // exception object if (DeclRefExpr *DRE = dyn_cast(Ex->IgnoreParens())) if (VarDecl *Var = dyn_cast(DRE->getDecl())) { diff --git a/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp b/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp index 4ec3d2750e..d717e3fe86 100644 --- a/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp +++ b/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp @@ -203,7 +203,7 @@ int AnalyzerOptions::getOptionAsInteger(StringRef Name, int DefaultVal) { SmallString<10> StrBuf; llvm::raw_svector_ostream OS(StrBuf); OS << DefaultVal; - + StringRef V = Config.insert(std::make_pair(Name, OS.str())).first->second; int Res = DefaultVal; bool b = V.getAsInteger(10, Res); diff --git a/tools/diagtool/ListWarnings.cpp b/tools/diagtool/ListWarnings.cpp index 5a26fc2282..3e6e88306e 100644 --- a/tools/diagtool/ListWarnings.cpp +++ b/tools/diagtool/ListWarnings.cpp @@ -97,11 +97,10 @@ int ListWarnings::run(unsigned int argc, char **argv, llvm::raw_ostream &out) { double avgDiagsPerFlag = (double) Flagged.size() / flagHistogram.size(); out << " Average number of diagnostics per flag: " << llvm::format("%.4g", avgDiagsPerFlag) << '\n'; - + out << " Number in -Wpedantic (not covered by other -W flags): " - << flagHistogram["pedantic"].size() - << '\n'; - + << flagHistogram["pedantic"].size() << '\n'; + out << '\n'; return 0;