From 48fd89ad143524c16962351ad41e099d61c7cebf Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 6 Jan 2012 20:42:20 +0000 Subject: [PATCH] Revert r147664; it's breaking clang regression tests. llvm-svn: 147681 --- clang/lib/AST/Expr.cpp | 4 ++-- clang/lib/CodeGen/CGExprAgg.cpp | 2 +- clang/lib/CodeGen/CGExprComplex.cpp | 2 +- clang/lib/CodeGen/CGExprScalar.cpp | 2 +- clang/lib/Driver/Tools.cpp | 2 +- clang/lib/Serialization/ASTReaderDecl.cpp | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 9a08886c3fce..bbf54112c850 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -490,8 +490,8 @@ double FloatingLiteral::getValueAsApproximateDouble() const { return V.convertToDouble(); } -int StringLiteral::mapCharByteWidth(TargetInfo const &target, StringKind k) { - int CharByteWidth = 0; +int StringLiteral::mapCharByteWidth(TargetInfo const &target,StringKind k) { + int CharByteWidth; switch(k) { case Ascii: case UTF8: diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 8f0e584285e3..47984af7f47e 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -469,7 +469,7 @@ VisitAbstractConditionalOperator(const AbstractConditionalOperator *E) { llvm::BasicBlock *ContBlock = CGF.createBasicBlock("cond.end"); // Bind the common expression if necessary. - CodeGenFunction::OpaqueValueMapping(CGF, E); + CodeGenFunction::OpaqueValueMapping binding(CGF, E); CodeGenFunction::ConditionalEvaluation eval(CGF); CGF.EmitBranchOnBoolExpr(E->getCond(), LHSBlock, RHSBlock); diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index 982044ea5310..d58db67917ac 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/lib/CodeGen/CGExprComplex.cpp @@ -680,7 +680,7 @@ VisitAbstractConditionalOperator(const AbstractConditionalOperator *E) { llvm::BasicBlock *ContBlock = CGF.createBasicBlock("cond.end"); // Bind the common expression if necessary. - CodeGenFunction::OpaqueValueMapping(CGF, E); + CodeGenFunction::OpaqueValueMapping binding(CGF, E); CodeGenFunction::ConditionalEvaluation eval(CGF); CGF.EmitBranchOnBoolExpr(E->getCond(), LHSBlock, RHSBlock); diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 2be086d9b79c..c2aec36ee86e 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -2483,7 +2483,7 @@ VisitAbstractConditionalOperator(const AbstractConditionalOperator *E) { TestAndClearIgnoreResultAssign(); // Bind the common expression if necessary. - CodeGenFunction::OpaqueValueMapping(CGF, E); + CodeGenFunction::OpaqueValueMapping binding(CGF, E); Expr *condExpr = E->getCond(); Expr *lhsExpr = E->getTrueExpr(); diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 76be9bdfac63..e69e2cb92479 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -737,7 +737,7 @@ void Clang::AddMIPSTargetArgs(const ArgList &Args, const Driver &D = getToolChain().getDriver(); StringRef ArchName; - const char *CPUName = 0; + const char *CPUName; // Set target cpu and architecture. if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) { diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index da79be933481..51a275ad0703 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -1226,7 +1226,7 @@ void ASTDeclReader::VisitRedeclarableTemplateDecl(RedeclarableTemplateDecl *D) { RedeclKind Kind = (RedeclKind)Record[Idx++]; // Determine the first declaration ID. - DeclID FirstDeclID = 0; + DeclID FirstDeclID; switch (Kind) { case FirstDeclaration: { FirstDeclID = ThisDeclID; @@ -1481,7 +1481,7 @@ ASTDeclReader::VisitRedeclarable(Redeclarable *D) { enum RedeclKind { FirstDeclaration = 0, FirstInFile, PointsToPrevious }; RedeclKind Kind = (RedeclKind)Record[Idx++]; - DeclID FirstDeclID = 0; + DeclID FirstDeclID; switch (Kind) { case FirstDeclaration: FirstDeclID = ThisDeclID;