]> granicus.if.org Git - clang/commitdiff
Fix some wonky formatting, remove spurious emacs major mode marker. No
authorNick Lewycky <nicholas@mxc.ca>
Thu, 24 Jan 2013 01:12:16 +0000 (01:12 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Thu, 24 Jan 2013 01:12:16 +0000 (01:12 +0000)
functionality change!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173314 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclAttr.cpp
lib/Sema/SemaOverload.cpp

index 45220f60d3e9a563750ac82ce38a514f50854b7f..beea474a7e1f4c07fb94da0b9cba99adb1d2d5b7 100644 (file)
@@ -1135,15 +1135,13 @@ static void handleNonNullAttr(Sema &S, Decl *D, const AttributeList &Attr) {
   // In C++ the implicit 'this' function parameter also counts, and they are
   // counted from one.
   bool HasImplicitThisParam = isInstanceMethod(D);
-  unsigned NumArgs  = getFunctionOrMethodNumArgs(D) + HasImplicitThisParam;
+  unsigned NumArgs = getFunctionOrMethodNumArgs(D) + HasImplicitThisParam;
 
   // The nonnull attribute only applies to pointers.
   SmallVector<unsigned, 10> NonNullArgs;
 
-  for (AttributeList::arg_iterator I=Attr.arg_begin(),
-                                   E=Attr.arg_end(); I!=E; ++I) {
-
-
+  for (AttributeList::arg_iterator I = Attr.arg_begin(),
+                                   E = Attr.arg_end(); I != E; ++I) {
     // The argument must be an integer constant expression.
     Expr *Ex = *I;
     llvm::APSInt ArgNum(32);
@@ -1190,11 +1188,11 @@ static void handleNonNullAttr(Sema &S, Decl *D, const AttributeList &Attr) {
   // If no arguments were specified to __attribute__((nonnull)) then all pointer
   // arguments have a nonnull attribute.
   if (NonNullArgs.empty()) {
-    for (unsigned I = 0, E = getFunctionOrMethodNumArgs(D); I != E; ++I) {
-      QualType T = getFunctionOrMethodArgType(D, I).getNonReferenceType();
+    for (unsigned i = 0, e = getFunctionOrMethodNumArgs(D); i != e; ++i) {
+      QualType T = getFunctionOrMethodArgType(D, i).getNonReferenceType();
       possibleTransparentUnionPointerType(T);
       if (T->isAnyPointerType() || T->isBlockPointerType())
-        NonNullArgs.push_back(I);
+        NonNullArgs.push_back(i);
     }
 
     // No pointer arguments?
@@ -1207,7 +1205,7 @@ static void handleNonNullAttr(Sema &S, Decl *D, const AttributeList &Attr) {
     }
   }
 
-  unsignedstart = &NonNullArgs[0];
+  unsigned *start = &NonNullArgs[0];
   unsigned size = NonNullArgs.size();
   llvm::array_pod_sort(start, start + size);
   D->addAttr(::new (S.Context) NonNullAttr(Attr.getRange(), S.Context, start,
index b91b027ba010069b613f85cc77752b1f11adcc6b..91d02dacc82d10ae859dd9c6bd2b6176e10b8086 100644 (file)
@@ -1,4 +1,4 @@
-//===--- SemaOverload.cpp - C++ Overloading ---------------------*- C++ -*-===//
+//===--- SemaOverload.cpp - C++ Overloading -------------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //