clang-format a recent commit I made

llvm-svn: 222317
This commit is contained in:
David Blaikie 2014-11-19 05:48:40 +00:00
parent 77c1ae8364
commit 3c8c46efd7
7 changed files with 15 additions and 16 deletions

View File

@ -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);

View File

@ -102,7 +102,7 @@ public:
llvm::SmallPtrSet<ObjCProtocolDecl *, 32> ObjCProtocolDecls;
llvm::SmallVector<const Decl *, 8> CFFunctionIBCandidates;
llvm::StringSet<> WhiteListFilenames;
ObjCMigrateASTConsumer(StringRef migrateDir,
unsigned astMigrateActions,
FileRemapper &remapper,

View File

@ -2606,7 +2606,7 @@ CodeGenModule::GetAddrOfConstantString(const StringLiteral *Literal) {
unsigned StringLength = 0;
llvm::StringMapEntry<llvm::Constant*> &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;
}

View File

@ -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;

View File

@ -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<DeclRefExpr>(Ex->IgnoreParens()))
if (VarDecl *Var = dyn_cast<VarDecl>(DRE->getDecl())) {

View File

@ -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);

View File

@ -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;