diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-01-24 01:12:16 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-01-24 01:12:16 +0000 |
commit | 5d9484da2168e20a70a16938bd8dee86ac82521a (patch) | |
tree | 83b125aa158fa2890d152b73f4589f753b483015 /lib/Sema/SemaDeclAttr.cpp | |
parent | 4ea6a646af4765791d0829034016bd47eff8c789 (diff) |
Fix some wonky formatting, remove spurious emacs major mode marker. No
functionality change!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 45220f60d3..beea474a7e 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -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) { } } - unsigned* start = &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, |