]> granicus.if.org Git - clang/commitdiff
Revert r147664; it's breaking clang regression tests.
authorEli Friedman <eli.friedman@gmail.com>
Fri, 6 Jan 2012 20:42:20 +0000 (20:42 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Fri, 6 Jan 2012 20:42:20 +0000 (20:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147681 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Expr.cpp
lib/CodeGen/CGExprAgg.cpp
lib/CodeGen/CGExprComplex.cpp
lib/CodeGen/CGExprScalar.cpp
lib/Driver/Tools.cpp
lib/Serialization/ASTReaderDecl.cpp

index 9a08886c3fcebddf29744159d97e7c6a6e11314b..bbf54112c8507c8a7ef0688897f56a0f91cf6beb 100644 (file)
@@ -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:
index 8f0e584285e32e0f7ca005152f727656f2b6774f..47984af7f47e38252379e6a09eaad903c0781746 100644 (file)
@@ -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);
index 982044ea5310f0677d64d9be21e2dd5044976c0c..d58db67917ac91c5cd1d9dc84e2bfd334a79f0c9 100644 (file)
@@ -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);
index 2be086d9b79c72499c735a45ac32579d0f42cc88..c2aec36ee86e74cab40dd1dd6f9e1e49e5c9eb30 100644 (file)
@@ -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();
index 76be9bdfac6358534a7f46e3d7534ccbe9506c3d..e69e2cb92479de677d1a034b9b0067e2545d286b 100644 (file)
@@ -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)) {
index da79be93348141703563738f8e7d1a345606857e..51a275ad070375410403e7e6bb7362b04f078297 100644 (file)
@@ -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<T> *D) {
   enum RedeclKind { FirstDeclaration = 0, FirstInFile, PointsToPrevious };
   RedeclKind Kind = (RedeclKind)Record[Idx++];
   
-  DeclID FirstDeclID = 0;
+  DeclID FirstDeclID;
   switch (Kind) {
   case FirstDeclaration:
     FirstDeclID = ThisDeclID;