[cfe-commits] r46566 - in /cfe/trunk: AST/ASTContext.cpp Driver/RewriteTest.cpp

Steve Naroff snaroff at apple.com
Wed Jan 30 11:17:43 PST 2008


Author: snaroff
Date: Wed Jan 30 13:17:43 2008
New Revision: 46566

URL: http://llvm.org/viewvc/llvm-project?rev=46566&view=rev
Log:

Abolish a bunch of Xcode inserted tabs.


Modified:
    cfe/trunk/AST/ASTContext.cpp
    cfe/trunk/Driver/RewriteTest.cpp

Modified: cfe/trunk/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/ASTContext.cpp?rev=46566&r1=46565&r2=46566&view=diff

==============================================================================
--- cfe/trunk/AST/ASTContext.cpp (original)
+++ cfe/trunk/AST/ASTContext.cpp Wed Jan 30 13:17:43 2008
@@ -1150,7 +1150,7 @@
   } else if (T->isEnumeralType()) {
     S += 'i';
   } else
-	assert(0 && "@encode for type not implemented!");
+    assert(0 && "@encode for type not implemented!");
 }
 
 void ASTContext::getObjCEncodingForTypeQualifier(Decl::ObjCDeclQualifier QT, 
@@ -1579,10 +1579,10 @@
       
     // The use of ellipsis agree...now check the argument types.
     for (unsigned i = 0; i < lproto_nargs; i++)
-	  // C99 6.7.5.3p15: ...and each parameter declared with qualified type
-	  // is taken as having the unqualified version of it's declared type.
+      // C99 6.7.5.3p15: ...and each parameter declared with qualified type
+      // is taken as having the unqualified version of it's declared type.
       if (!typesAreCompatible(lproto->getArgType(i).getUnqualifiedType(), 
-	                          rproto->getArgType(i).getUnqualifiedType()))
+                              rproto->getArgType(i).getUnqualifiedType()))
         return false;
     return true;
   }
@@ -1651,7 +1651,7 @@
     // is an interface, we defer to objcTypesAreCompatible(). 
     if (lcanon->isObjCInterfaceType() || rcanon->isObjCInterfaceType())
       return objcTypesAreCompatible(lcanon, rcanon);
-	  
+      
     // C99 6.7.2.2p4: Each enumerated type shall be compatible with char,
     // a signed integer type, or an unsigned integer type. 
     // FIXME: need to check the size and ensure it's the same.

Modified: cfe/trunk/Driver/RewriteTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteTest.cpp?rev=46566&r1=46565&r2=46566&view=diff

==============================================================================
--- cfe/trunk/Driver/RewriteTest.cpp (original)
+++ cfe/trunk/Driver/RewriteTest.cpp Wed Jan 30 13:17:43 2008
@@ -35,8 +35,8 @@
   class RewriteTest : public ASTConsumer {
     Rewriter Rewrite;
     Diagnostic &Diags;
-	unsigned RewriteFailedDiag;
-	
+    unsigned RewriteFailedDiag;
+    
     ASTContext *Context;
     SourceManager *SM;
     unsigned MainFileID;
@@ -96,7 +96,7 @@
       CurMethodDecl = 0;
       SuperStructDecl = 0;
       BcLabelCount = 0;
-	  
+      
       // Get the ID and start/end of the main file.
       MainFileID = SM->getMainFileID();
       const llvm::MemoryBuffer *MainBuf = SM->getBuffer(MainFileID);
@@ -165,10 +165,10 @@
     virtual void HandleTopLevelDecl(Decl *D);
     void HandleDeclInMainFile(Decl *D);
     RewriteTest(bool isHeader, Diagnostic &D) : Diags(D) {
-	  IsHeader = isHeader;
+      IsHeader = isHeader;
       RewriteFailedDiag = Diags.getCustomDiagID(Diagnostic::Warning, 
                "rewriting sub-expression within a macro (may not be correct)");
-	}
+    }
     ~RewriteTest();
 
     // Syntactic Rewriting.
@@ -314,7 +314,7 @@
   if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
     if (Stmt *Body = FD->getBody())
       FD->setBody(RewriteFunctionBodyOrGlobalInitializer(Body));
-	  
+      
   if (ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D)) {
     if (Stmt *Body = MD->getBody()) {
       //Body->dump();
@@ -464,10 +464,10 @@
   SourceLocation LocEnd = Method->getLocEnd();
     
   if (SM->getLineNumber(LocEnd) > SM->getLineNumber(LocStart)) {
-	Rewrite.InsertText(LocStart, "/* ", 3);
-	Rewrite.ReplaceText(LocEnd, 1, ";*/ ", 4);
+    Rewrite.InsertText(LocStart, "/* ", 3);
+    Rewrite.ReplaceText(LocEnd, 1, ";*/ ", 4);
   } else {
-	Rewrite.InsertText(LocStart, "// ", 3);
+    Rewrite.InsertText(LocStart, "// ", 3);
   }
 }
 
@@ -710,9 +710,9 @@
     if (Rewrite.ReplaceStmt(IV, Replacement)) {
       // replacement failed.
       SourceRange Range = IV->getSourceRange();
-	  if (!SilenceRewriteMacroWarning)
+      if (!SilenceRewriteMacroWarning)
         Diags.Report(Context->getFullLoc(IV->getLocation()), RewriteFailedDiag, 
-	                                     0, 0, &Range, 1);
+                                         0, 0, &Range, 1);
     }
     delete IV;
     return Replacement;
@@ -736,9 +736,9 @@
           if (Rewrite.ReplaceStmt(IV->getBase(), PE)) {
             // replacement failed.
             SourceRange Range = IV->getBase()->getSourceRange();
-	        if (!SilenceRewriteMacroWarning)
+            if (!SilenceRewriteMacroWarning)
               Diags.Report(Context->getFullLoc(IV->getBase()->getLocStart()), 
-						   RewriteFailedDiag, 0, 0, &Range, 1);
+                           RewriteFailedDiag, 0, 0, &Range, 1);
           }
           delete IV->getBase();
           return PE;
@@ -781,7 +781,7 @@
 
   if (ObjCSelectorExpr *AtSelector = dyn_cast<ObjCSelectorExpr>(S))
     return RewriteAtSelector(AtSelector);
-	
+    
   if (ObjCStringLiteral *AtString = dyn_cast<ObjCStringLiteral>(S))
     return RewriteObjCStringLiteral(AtString);
     
@@ -1305,7 +1305,7 @@
     SourceRange Range = Exp->getSourceRange();
     if (!SilenceRewriteMacroWarning)
       Diags.Report(Context->getFullLoc(Exp->getAtLoc()), RewriteFailedDiag,
-	                                   0, 0, &Range, 1);
+                                       0, 0, &Range, 1);
   }
   
   // Replace this subexpr in the parent.
@@ -1329,7 +1329,7 @@
     SourceRange Range = Exp->getSourceRange();
     if (!SilenceRewriteMacroWarning)
       Diags.Report(Context->getFullLoc(Exp->getAtLoc()), RewriteFailedDiag,
-	                                   0, 0, &Range, 1);
+                                       0, 0, &Range, 1);
   }
   delete Exp;
   return SelExp;
@@ -1661,7 +1661,7 @@
     SourceRange Range = Exp->getSourceRange();
     if (!SilenceRewriteMacroWarning)
       Diags.Report(Context->getFullLoc(Exp->getAtLoc()), RewriteFailedDiag,
-	                                   0, 0, &Range, 1);
+                                       0, 0, &Range, 1);
   }
   delete Exp;
   return cast;
@@ -2041,7 +2041,7 @@
     SourceRange Range = Exp->getSourceRange();
     if (!SilenceRewriteMacroWarning)
       Diags.Report(Context->getFullLoc(Exp->getLocStart()), RewriteFailedDiag,
-	                                   0, 0, &Range, 1);
+                                       0, 0, &Range, 1);
   }
   
   delete Exp;
@@ -2068,7 +2068,7 @@
     SourceRange Range = Exp->getSourceRange();
     if (!SilenceRewriteMacroWarning)
       Diags.Report(Context->getFullLoc(Exp->getAtLoc()), RewriteFailedDiag,
-	                                   0, 0, &Range, 1);
+                                       0, 0, &Range, 1);
   }
   delete Exp;
   return ProtoExp;
@@ -2116,11 +2116,11 @@
     if (RCDecl && ObjCSynthesizedStructs.count(RCDecl)) {
       Result = "\n    struct ";
       Result += RCDecl->getName();
-	  // Note: We don't name the field decl. This simplifies the "codegen" for
-	  // accessing a superclasses instance variables (and is similar to what gcc
-	  // does internally). The unnamed struct field feature is enabled with
-	  // -fms-extensions. If the struct definition were "inlined", we wouldn't
-	  // need to use this switch. That said, I don't want to inline the def.
+      // Note: We don't name the field decl. This simplifies the "codegen" for
+      // accessing a superclasses instance variables (and is similar to what gcc
+      // does internally). The unnamed struct field feature is enabled with
+      // -fms-extensions. If the struct definition were "inlined", we wouldn't
+      // need to use this switch. That said, I don't want to inline the def.
       Result += ";\n";
       
       // insert the super class structure definition.
@@ -2163,11 +2163,11 @@
     endBuf += Lexer::MeasureTokenLength(LocEnd, *SM);
     Result += " {\n    struct ";
     Result += RCDecl->getName();
-	// Note: We don't name the field decl. This simplifies the "codegen" for
-	// accessing a superclasses instance variables (and is similar to what gcc
-	// does internally). The unnamed struct field feature is enabled with
-	// -fms-extensions. If the struct definition were "inlined", we wouldn't
-	// need to use this switch. That said, I don't want to inline the def.
+    // Note: We don't name the field decl. This simplifies the "codegen" for
+    // accessing a superclasses instance variables (and is similar to what gcc
+    // does internally). The unnamed struct field feature is enabled with
+    // -fms-extensions. If the struct definition were "inlined", we wouldn't
+    // need to use this switch. That said, I don't want to inline the def.
     Result += ";\n};\n";
     Rewrite.ReplaceText(LocStart, endBuf-startBuf, 
                         Result.c_str(), Result.size());





More information about the cfe-commits mailing list