]> granicus.if.org Git - clang/commitdiff
Detabify.
authorEli Friedman <eli.friedman@gmail.com>
Sun, 22 Aug 2010 01:00:03 +0000 (01:00 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sun, 22 Aug 2010 01:00:03 +0000 (01:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111768 91177308-0d34-0410-b5e6-96231b3b80d8

16 files changed:
lib/AST/ASTContext.cpp
lib/Analysis/FormatString.cpp
lib/Basic/Targets.cpp
lib/Checker/CheckSecuritySyntaxOnly.cpp
lib/Checker/GRExprEngine.cpp
lib/Checker/StackAddrLeakChecker.cpp
lib/Checker/StreamChecker.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGExprConstant.cpp
lib/CodeGen/CGRTTI.cpp
lib/CodeGen/CGStmt.cpp
lib/CodeGen/Mangle.cpp
lib/Frontend/InitHeaderSearch.cpp
lib/Lex/PPDirectives.cpp
lib/Sema/SemaExpr.cpp
tools/libclang/CIndexUSRs.cpp

index 890dfc3490ad68486be72a33c02f8cdcec3f5727..37ef59cc36fc87d8b0fd8573372f0a2c29599aea 100644 (file)
@@ -3171,8 +3171,8 @@ QualType ASTContext::BuildByRefType(llvm::StringRef DeclName, QualType Ty) {
   //    struct __Block_byref_1_X *__forwarding;
   //    unsigned int __flags;
   //    unsigned int __size;
-  //    void *__copy_helper;           // as needed
-  //    void *__destroy_help           // as needed
+  //    void *__copy_helper;            // as needed
+  //    void *__destroy_help            // as needed
   //    int X;
   //  } *
 
index 0fbe54353eb85c00c22936ee527a96da6747c70a..a6cfba228e9b795b22422fad29168d8c80d07004 100644 (file)
@@ -280,7 +280,7 @@ bool ArgTypeResult::matchesType(ASTContext &C, QualType argTy) const {
 
     case CPointerTy:
       return argTy->getAs<PointerType>() != NULL ||
-            argTy->getAs<ObjCObjectPointerType>() != NULL;
+             argTy->getAs<ObjCObjectPointerType>() != NULL;
 
     case ObjCPointerTy:
       return argTy->getAs<ObjCObjectPointerType>() != NULL;
index cabe50a5600d32eb0f972859f1162b3a15bd726e..af4925b429bc4dc64fc68d6ae93c823c2d44e1c4 100644 (file)
@@ -1406,7 +1406,7 @@ public:
     SizeType = UnsignedLong;
     IntPtrType = SignedLong;
     PtrDiffType = SignedLong;
-  }                                            
+  }
   virtual void getTargetDefines(const LangOptions &Opts,
                                 MacroBuilder &Builder) const {
     X86_32TargetInfo::getTargetDefines(Opts, Builder);
index 9dfe512dc3b3ee613b16ac5905de5471751470d0..4dc3afe70e6a46125c5ce59fbef7cdd369b5db50 100644 (file)
@@ -41,8 +41,8 @@ class WalkAST : public StmtVisitor<WalkAST> {
 
 public:
   WalkAST(BugReporter &br) : BR(br),
-                            II_gets(0), II_getpw(0), II_mktemp(0),
-                            II_rand(), II_random(0), II_setid(),
+                             II_gets(0), II_getpw(0), II_mktemp(0),
+                             II_rand(), II_random(0), II_setid(),
                  CheckRand(isArc4RandomAvailable(BR.getContext())) {}
 
   // Statement visitor methods.
@@ -332,10 +332,10 @@ void WalkAST::CheckCall_mktemp(const CallExpr *CE, const FunctionDecl *FD) {
   // Issue a waring.
   SourceRange R = CE->getCallee()->getSourceRange();
   BR.EmitBasicReport("Potential insecure temporary file in call 'mktemp'",
-                    "Security",
-                    "Call to function 'mktemp' is insecure as it always "
-                    "creates or uses insecure temporary file.  Use 'mkstemp' instead",
-                    CE->getLocStart(), &R, 1);
+                     "Security",
+                     "Call to function 'mktemp' is insecure as it always "
+                     "creates or uses insecure temporary file.  Use 'mkstemp' instead",
+                     CE->getLocStart(), &R, 1);
 }
 
 //===----------------------------------------------------------------------===//
index e306ac6667ec8d57e827e081b0bff761fc6d9382..980d83cdab74557071c284f15b9e54dac430eb6f 100644 (file)
@@ -3000,9 +3000,9 @@ void GRExprEngine::VisitUnaryOperator(const UnaryOperator* U,
       ExplodedNodeSet Tmp;
 
       if (asLValue)
-       VisitLValue(Ex, Pred, Tmp);
+        VisitLValue(Ex, Pred, Tmp);
       else
-       Visit(Ex, Pred, Tmp);
+        Visit(Ex, Pred, Tmp);
 
       for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
         const GRState* state = GetState(*I);
index f4a9db62df4ba2755d960abe4d826fa37ba24239..c67a81dced0a50fa7ceeed93d9293d33a17f70e5 100644 (file)
@@ -108,7 +108,7 @@ void StackAddrLeakChecker::EmitStackError(CheckerContext &C, const MemRegion *R,
     report->addRange(range);
 
   C.EmitReport(report);
-}      
+}
 
 void StackAddrLeakChecker::PreVisitReturnStmt(CheckerContext &C,
                                               const ReturnStmt *RS) {
index b18ab2908c5891324ad0ded81e7d19bccd489bf8..87874e315a5d9ac8f3bb1b90491263f0cbbe8cc3 100644 (file)
@@ -367,8 +367,8 @@ const GRState *StreamChecker::CheckNullStream(SVal SV, const GRState *state,
 }
 
 const GRState *StreamChecker::CheckDoubleClose(const CallExpr *CE,
-                                              const GRState *state,
-                                              CheckerContext &C) {
+                                               const GRState *state,
+                                               CheckerContext &C) {
   SymbolRef Sym = state->getSVal(CE->getArg(0)).getAsSymbol();
   assert(Sym);
   
@@ -384,11 +384,11 @@ const GRState *StreamChecker::CheckDoubleClose(const CallExpr *CE,
     ExplodedNode *N = C.GenerateSink();
     if (N) {
       if (!BT_doubleclose)
-       BT_doubleclose = new BuiltinBug("Double fclose",
-                                       "Try to close a file Descriptor already"
-                                       " closed. Cause undefined behaviour.");
+        BT_doubleclose = new BuiltinBug("Double fclose",
+                                        "Try to close a file Descriptor already"
+                                        " closed. Cause undefined behaviour.");
       BugReport *R = new BugReport(*BT_doubleclose,
-                                  BT_doubleclose->getDescription(), N);
+                                   BT_doubleclose->getDescription(), N);
       C.EmitReport(R);
     }
     return NULL;
@@ -400,7 +400,7 @@ const GRState *StreamChecker::CheckDoubleClose(const CallExpr *CE,
 
 void StreamChecker::EvalDeadSymbols(CheckerContext &C,SymbolReaper &SymReaper) {
   for (SymbolReaper::dead_iterator I = SymReaper.dead_begin(),
-        E = SymReaper.dead_end(); I != E; ++I) {
+         E = SymReaper.dead_end(); I != E; ++I) {
     SymbolRef Sym = *I;
     const GRState *state = C.getState();
     const StreamState *SS = state->get<StreamState>(Sym);
@@ -410,19 +410,19 @@ void StreamChecker::EvalDeadSymbols(CheckerContext &C,SymbolReaper &SymReaper) {
     if (SS->isOpened()) {
       ExplodedNode *N = C.GenerateSink();
       if (N) {
-       if (!BT_ResourceLeak)
-         BT_ResourceLeak = new BuiltinBug("Resource Leak", 
-                         "Opened File never closed. Potential Resource leak.");
-       BugReport *R = new BugReport(*BT_ResourceLeak, 
-                                    BT_ResourceLeak->getDescription(), N);
-       C.EmitReport(R);
+        if (!BT_ResourceLeak)
+          BT_ResourceLeak = new BuiltinBug("Resource Leak", 
+                          "Opened File never closed. Potential Resource leak.");
+        BugReport *R = new BugReport(*BT_ResourceLeak, 
+                                     BT_ResourceLeak->getDescription(), N);
+        C.EmitReport(R);
       }
     }
   }
 }
 
 void StreamChecker::EvalEndPath(GREndPathNodeBuilder &B, void *tag,
-                               GRExprEngine &Eng) {
+                                GRExprEngine &Eng) {
   SaveAndRestore<bool> OldHasGen(B.HasGeneratedNode);
   const GRState *state = B.getState();
   typedef llvm::ImmutableMap<SymbolRef, StreamState> SymMap;
@@ -435,9 +435,9 @@ void StreamChecker::EvalEndPath(GREndPathNodeBuilder &B, void *tag,
       if (N) {
         if (!BT_ResourceLeak)
           BT_ResourceLeak = new BuiltinBug("Resource Leak", 
-                         "Opened File never closed. Potential Resource leak.");
+                          "Opened File never closed. Potential Resource leak.");
         BugReport *R = new BugReport(*BT_ResourceLeak, 
-                                    BT_ResourceLeak->getDescription(), N);
+                                     BT_ResourceLeak->getDescription(), N);
         Eng.getBugReporter().EmitReport(R);
       }
     }
index 9023c3c6350baf7f23e259f3a836e0d458cda6ea..81947f9ba34f81cca1b5807c69b7b5880e1be990 100644 (file)
@@ -1136,7 +1136,7 @@ llvm::DIType CGDebugInfo::CreateType(const TagType *Ty,
 }
 
 llvm::DIType CGDebugInfo::CreateType(const VectorType *Ty,
-                                    llvm::DIFile Unit) {
+                                     llvm::DIFile Unit) {
   llvm::DIType ElementTy = getOrCreateType(Ty->getElementType(), Unit);
   uint64_t NumElems = Ty->getNumElements();
   if (NumElems > 0)
@@ -1152,7 +1152,7 @@ llvm::DIType CGDebugInfo::CreateType(const VectorType *Ty,
     DebugFactory.CreateCompositeType(llvm::dwarf::DW_TAG_vector_type,
                                      Unit, "", Unit,
                                      0, Size, Align, 0, 0,
-                                    ElementTy,  SubscriptArray);
+                                     ElementTy,  SubscriptArray);
 }
 
 llvm::DIType CGDebugInfo::CreateType(const ArrayType *Ty,
@@ -1845,7 +1845,7 @@ CGDebugInfo::getOrCreateNameSpace(const NamespaceDecl *NSDecl,
     getContextDescriptor(dyn_cast<Decl>(NSDecl->getDeclContext()), Unit);
   llvm::DINameSpace NS =
     DebugFactory.CreateNameSpace(Context, NSDecl->getName(), 
-       llvm::DIFile(Unit), LineNo);
+        llvm::DIFile(Unit), LineNo);
   NameSpaceCache[NSDecl] = llvm::WeakVH(NS);
   return NS;
 }
index 946a694b76fa7480e3aecc4f8d288d39cf5de928..6acc02c5b9e9a96cbb7ba3b38f2a1d171789cf7b 100644 (file)
@@ -793,7 +793,7 @@ public:
     case Expr::DeclRefExprClass: {
       ValueDecl *Decl = cast<DeclRefExpr>(E)->getDecl();
       if (Decl->hasAttr<WeakRefAttr>())
-       return CGM.GetWeakRefReference(Decl);
+        return CGM.GetWeakRefReference(Decl);
       if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(Decl))
         return CGM.GetAddrOfFunction(FD);
       if (const VarDecl* VD = dyn_cast<VarDecl>(Decl)) {
index 914ace850d7da0dbb78f098124066ae71020ea65..2a90b3736f1ce9be4f00487f4eb0bb7469ff9240 100644 (file)
@@ -796,7 +796,7 @@ void RTTIBuilder::BuildVMIClassTypeInfo(const CXXRecordDecl *RD) {
   //   direct proper base. Each description is of the type:
   //
   //   struct abi::__base_class_type_info {
-       //   public:
+  //   public:
   //     const __class_type_info *__base_type;
   //     long __offset_flags;
   //
index 6dad8597a8844cb121087c613f486e2981697944..3a6c44aba01a58c4726700e8f0a577e7b9617c5f 100644 (file)
@@ -877,8 +877,8 @@ SimplifyConstraint(const char *Constraint, const TargetInfo &Target,
     case '=': // Will see this and the following in mult-alt constraints.
     case '+':
       break;
-    case ',':                  // FIXME - Until the back-end properly supports
-               return Result;  // multiple alternative constraints, we stop here.
+    case ',':                 // FIXME - Until the back-end properly supports
+              return Result;  // multiple alternative constraints, we stop here.
       break;
     case 'g':
       Result += "imr";
index 312bc9920d92a6bc00d9b37973b5aaeda7d33350..c06b4fc699ca50212540d0afce179c360ba1fa89 100644 (file)
@@ -1280,7 +1280,7 @@ void CXXNameMangler::mangleBareFunctionType(const FunctionType *T,
     mangleType(Proto->getResultType());
 
   if (Proto->getNumArgs() == 0 && !Proto->isVariadic()) {
-    //   <builtin-type> ::= v  # void
+    //   <builtin-type> ::= v   # void
     Out << 'v';
     return;
   }
@@ -1560,10 +1560,10 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity) {
   // <expression> ::= <unary operator-name> <expression>
   //              ::= <binary operator-name> <expression> <expression>
   //              ::= <trinary operator-name> <expression> <expression> <expression>
-  //              ::= cl <expression>* E            # call
+  //              ::= cl <expression>* E             # call
   //              ::= cv <type> expression           # conversion with one argument
   //              ::= cv <type> _ <expression>* E # conversion with a different number of arguments
-  //              ::= st <type>                             # sizeof (a type)
+  //              ::= st <type>                      # sizeof (a type)
   //              ::= at <type>                      # alignof (a type)
   //              ::= <template-param>
   //              ::= <function-param>
index f03502a4384756ea34d9ceec12fd0818923428b6..55e3a4264af8cb7b5c5202e295e7ed2753a0c449 100644 (file)
@@ -520,7 +520,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
     AddPath("/boot/develop/headers/glibc", System, true, false, false);
     AddPath("/boot/develop/headers/posix", System, true, false, false);
     AddPath("/boot/develop/headers",  System, true, false, false);
-       break;
+    break;
   case llvm::Triple::MinGW64:
   case llvm::Triple::MinGW32:
     AddPath("c:/mingw/include", System, true, false, false);
index 43ec3da51a8cf707a29a3ce04db61fef4f96c05b..e000c54768552a98e1c99e818d40fed9a865061e 100644 (file)
@@ -1460,7 +1460,7 @@ void Preprocessor::HandleDefineDirective(Token &DefineTok) {
       // Macros must be identical.  This means all tokens and whitespace
       // separation must be the same.  C99 6.10.3.2.
       if (!OtherMI->isAllowRedefinitionsWithoutWarning() &&
-             !MI->isIdenticalTo(*OtherMI, *this)) {
+          !MI->isIdenticalTo(*OtherMI, *this)) {
         Diag(MI->getDefinitionLoc(), diag::ext_pp_macro_redef)
           << MacroNameTok.getIdentifierInfo();
         Diag(OtherMI->getDefinitionLoc(), diag::note_previous_definition);
index b192b1029e32ba932abc0228a0f4d0cd5120fd8b..2012f7f2fd8212de443f6a3fe751073948bc7450 100644 (file)
@@ -896,7 +896,7 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R,
               CallsUndergoingInstantiation.back()->getCallee());
           CXXMethodDecl *DepMethod = cast_or_null<CXXMethodDecl>(
               CurMethod->getInstantiatedFromMemberFunction());
-         if (DepMethod) {
+          if (DepMethod) {
             Diag(R.getNameLoc(), diagnostic) << Name
               << FixItHint::CreateInsertion(R.getNameLoc(), "this->");
             QualType DepThisType = DepMethod->getThisType(Context);
@@ -911,11 +911,11 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R,
                     ULE->getQualifier(), ULE->getQualifierRange(), NULL,
                     R.getLookupNameInfo(), &TList);
             CallsUndergoingInstantiation.back()->setCallee(DepExpr);
-         } else {
+          } else {
             // FIXME: we should be able to handle this case too. It is correct
             // to add this-> here. This is a workaround for PR7947.
             Diag(R.getNameLoc(), diagnostic) << Name;
-         }
+          }
         } else {
           Diag(R.getNameLoc(), diagnostic) << Name;
         }
index 602a0c7c36a926428f2709d32f52524f43fe896d..886030fe3800c1f3226680322e4cc5740897564f 100644 (file)
@@ -207,7 +207,7 @@ void USRGenerator::VisitVarDecl(VarDecl *D) {
 
   // The string can be empty if the declaration has no name; e.g., it is
   // the ParmDecl with no name for declaration of a function pointer type, e.g.:
-  //   void  (*f)(void *);
+  //    void  (*f)(void *);
   // In this case, don't generate a USR.
   if (s.empty())
     IgnoreResults = true;