[cfe-commits] r137896 - in /cfe/trunk/lib: AST/ASTContext.cpp AST/Decl.cpp AST/DeclObjC.cpp Analysis/CFG.cpp Analysis/CocoaConventions.cpp Analysis/PrintfFormatString.cpp Analysis/UninitializedValues.cpp Driver/ArgList.cpp Driver/Driver.cpp Driver/Tools.cpp
Chad Rosier
mcrosier at apple.com
Wed Aug 17 16:08:45 PDT 2011
Author: mcrosier
Date: Wed Aug 17 18:08:45 2011
New Revision: 137896
URL: http://llvm.org/viewvc/llvm-project?rev=137896&view=rev
Log:
Fix else style. No functionality change intended.
Modified:
cfe/trunk/lib/AST/ASTContext.cpp
cfe/trunk/lib/AST/Decl.cpp
cfe/trunk/lib/AST/DeclObjC.cpp
cfe/trunk/lib/Analysis/CFG.cpp
cfe/trunk/lib/Analysis/CocoaConventions.cpp
cfe/trunk/lib/Analysis/PrintfFormatString.cpp
cfe/trunk/lib/Analysis/UninitializedValues.cpp
cfe/trunk/lib/Driver/ArgList.cpp
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=137896&r1=137895&r2=137896&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Wed Aug 17 18:08:45 2011
@@ -1116,8 +1116,7 @@
for (ObjCInterfaceDecl::ivar_iterator I = OI->ivar_begin(),
E = OI->ivar_end(); I != E; ++I)
Ivars.push_back(*I);
- }
- else {
+ } else {
ObjCInterfaceDecl *IDecl = const_cast<ObjCInterfaceDecl *>(OI);
for (const ObjCIvarDecl *Iv = IDecl->all_declared_ivar_begin(); Iv;
Iv= Iv->getNextIvar())
@@ -2762,8 +2761,7 @@
// typeof(expr) type. Use that as our canonical type.
toe = new (*this, TypeAlignment) TypeOfExprType(tofExpr,
QualType((TypeOfExprType*)Canon, 0));
- }
- else {
+ } else {
// Build a new, canonical typeof(expr) type.
Canon
= new (*this, TypeAlignment) DependentTypeOfExprType(*this, tofExpr);
@@ -2846,8 +2844,7 @@
// decltype type. Use that as our canonical type.
dt = new (*this, TypeAlignment) DecltypeType(e, DependentTy,
QualType((DecltypeType*)Canon, 0));
- }
- else {
+ } else {
// Build a new, canonical typeof(expr) type.
Canon = new (*this, TypeAlignment) DependentDecltypeType(*this, e);
DependentDecltypeTypes.InsertNode(Canon, InsertPos);
@@ -5246,8 +5243,7 @@
for (unsigned i = 0; i < RHSNumProtocols; ++i)
if (InheritedProtocolSet.count(RHSProtocols[i]))
IntersectionOfProtocols.push_back(RHSProtocols[i]);
- }
- else {
+ } else {
llvm::SmallPtrSet<ObjCProtocolDecl *, 8> RHSInheritedProtocols;
Context.CollectInheritedProtocols(RHS->getInterface(),
RHSInheritedProtocols);
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=137896&r1=137895&r2=137896&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Wed Aug 17 18:08:45 2011
@@ -1003,8 +1003,7 @@
}
// Set qualifier info.
getExtInfo()->QualifierLoc = QualifierLoc;
- }
- else {
+ } else {
// Here Qualifier == 0, i.e., we are removing the qualifier (if any).
if (hasExtInfo()) {
if (getExtInfo()->NumTemplParamLists == 0) {
@@ -2290,8 +2289,7 @@
TypedefNameDeclOrQualifier = new (getASTContext()) ExtInfo;
// Set qualifier info.
getExtInfo()->QualifierLoc = QualifierLoc;
- }
- else {
+ } else {
// Here Qualifier == 0, i.e., we are removing the qualifier (if any).
if (hasExtInfo()) {
if (getExtInfo()->NumTemplParamLists == 0) {
Modified: cfe/trunk/lib/AST/DeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=137896&r1=137895&r2=137896&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclObjC.cpp (original)
+++ cfe/trunk/lib/AST/DeclObjC.cpp Wed Aug 17 18:08:45 2011
@@ -758,8 +758,7 @@
ID = IM->getClassInterface();
if (BW)
IM->setHasSynthBitfield(true);
- }
- else {
+ } else {
ObjCCategoryDecl *CD = cast<ObjCCategoryDecl>(DC);
ID = CD->getClassInterface();
if (BW)
Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=137896&r1=137895&r2=137896&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Wed Aug 17 18:08:45 2011
@@ -2203,8 +2203,7 @@
for (const VariableArrayType *VA =FindVA(E->getArgumentType().getTypePtr());
VA != 0; VA = FindVA(VA->getElementType().getTypePtr()))
lastBlock = addStmt(VA->getSizeExpr());
- }
- else {
+ } else {
// For sizeof(x), where 'x' is a VLA, we should include the computation
// of the lvalue of 'x'.
Expr *subEx = E->getArgumentExpr();
Modified: cfe/trunk/lib/Analysis/CocoaConventions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CocoaConventions.cpp?rev=137896&r1=137895&r2=137896&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CocoaConventions.cpp (original)
+++ cfe/trunk/lib/Analysis/CocoaConventions.cpp Wed Aug 17 18:08:45 2011
@@ -152,8 +152,7 @@
}
else if (suffix.startswith("opy")) {
it += 3;
- }
- else {
+ } else {
// Keep scanning.
continue;
}
Modified: cfe/trunk/lib/Analysis/PrintfFormatString.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/PrintfFormatString.cpp?rev=137896&r1=137895&r2=137896&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/PrintfFormatString.cpp (original)
+++ cfe/trunk/lib/Analysis/PrintfFormatString.cpp Wed Aug 17 18:08:45 2011
@@ -38,8 +38,7 @@
unsigned *argIndex) {
if (argIndex) {
FS.setPrecision(ParseNonPositionAmount(Beg, E, *argIndex));
- }
- else {
+ } else {
const OptionalAmount Amt = ParsePositionAmount(H, Start, Beg, E,
analyze_format_string::PrecisionPos);
if (Amt.isInvalid())
@@ -461,8 +460,7 @@
CS.setKind(ConversionSpecifier::uArg);
HasAlternativeForm = 0;
HasPlusPrefix = 0;
- }
- else {
+ } else {
assert(0 && "Unexpected type");
}
Modified: cfe/trunk/lib/Analysis/UninitializedValues.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/UninitializedValues.cpp?rev=137896&r1=137895&r2=137896&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/UninitializedValues.cpp (original)
+++ cfe/trunk/lib/Analysis/UninitializedValues.cpp Wed Aug 17 18:08:45 2011
@@ -425,8 +425,7 @@
vd = cast<VarDecl>(ds->getSingleDecl());
if (!isTrackedVar(vd))
vd = 0;
- }
- else {
+ } else {
// Initialize the value of the reference variable.
const FindVarResult &res = findBlockVarDecl(cast<Expr>(element));
vd = res.getDecl();
@@ -642,8 +641,7 @@
vals.mergeIntoScratch(*(vB.second ? vB.second : vB.first), false);
valsAB.first = vA.first;
valsAB.second = &vals.getScratch();
- }
- else {
+ } else {
// Merge the 'T' bits from the first and second.
assert(b->getOpcode() == BO_LOr);
vals.mergeIntoScratch(*vA.first, true);
Modified: cfe/trunk/lib/Driver/ArgList.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ArgList.cpp?rev=137896&r1=137895&r2=137896&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ArgList.cpp (original)
+++ cfe/trunk/lib/Driver/ArgList.cpp Wed Aug 17 18:08:45 2011
@@ -51,8 +51,9 @@
if ((*it)->getOption().matches(Id)) {
it = Args.erase(it);
ie = end();
- } else
+ } else {
++it;
+ }
}
}
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=137896&r1=137895&r2=137896&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Wed Aug 17 18:08:45 2011
@@ -397,8 +397,9 @@
if (types::getPreprocessedType(it->first) == types::TY_INVALID) {
it = Inputs.erase(it);
ie = Inputs.end();
- } else
+ } else {
++it;
+ }
}
if (Inputs.empty()) {
Diag(clang::diag::note_drv_command_failed_diag_msg)
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=137896&r1=137895&r2=137896&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Aug 17 18:08:45 2011
@@ -2438,11 +2438,10 @@
if (Arg *OutputOpt = Args.getLastArg(options::OPT_o)) {
std::string Str(OutputOpt->getValue(Args));
-
Res = Str.substr(0, Str.rfind('.'));
- } else
+ } else {
Res = darwin::CC1::getBaseInputStem(Args, Inputs);
-
+ }
return Args.MakeArgString(Res + ".d");
}
@@ -2452,9 +2451,9 @@
if (!strcmp(*it, "-Wno-self-assign")) {
it = CmdArgs.erase(it);
ie = CmdArgs.end();
- }
- else
+ } else {
++it;
+ }
}
}
More information about the cfe-commits
mailing list