[cfe-commits] r120613 - /cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Eric Christopher
echristo at apple.com
Wed Dec 1 14:13:54 PST 2010
Author: echristo
Date: Wed Dec 1 16:13:54 2010
New Revision: 120613
URL: http://llvm.org/viewvc/llvm-project?rev=120613&view=rev
Log:
80-col fixups.
Modified:
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=120613&r1=120612&r2=120613&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Wed Dec 1 16:13:54 2010
@@ -651,7 +651,8 @@
}
// GCC will accept anything as the argument of weakref. Should we
// check for an existing decl?
- d->addAttr(::new (S.Context) AliasAttr(Attr.getLoc(), S.Context, Str->getString()));
+ d->addAttr(::new (S.Context) AliasAttr(Attr.getLoc(), S.Context,
+ Str->getString()));
}
d->addAttr(::new (S.Context) WeakRefAttr(Attr.getLoc(), S.Context));
@@ -676,7 +677,8 @@
// FIXME: check if target symbol exists in current file
- d->addAttr(::new (S.Context) AliasAttr(Attr.getLoc(), S.Context, Str->getString()));
+ d->addAttr(::new (S.Context) AliasAttr(Attr.getLoc(), S.Context,
+ Str->getString()));
}
static void HandleNakedAttr(Decl *d, const AttributeList &Attr,
@@ -779,10 +781,11 @@
/*
Returning a Vector Class in Registers
- According to the PPU ABI specifications, a class with a single member of vector type is returned in
- memory when used as the return value of a function. This results in inefficient code when implementing
- vector classes. To return the value in a single vector register, add the vecreturn attribute to the class
- definition. This attribute is also applicable to struct types.
+ According to the PPU ABI specifications, a class with a single member of
+ vector type is returned in memory when used as the return value of a function.
+ This results in inefficient code when implementing vector classes. To return
+ the value in a single vector register, add the vecreturn attribute to the
+ class definition. This attribute is also applicable to struct types.
Example:
@@ -822,7 +825,8 @@
return;
}
- for (RecordDecl::field_iterator iter = record->field_begin(); iter != record->field_end(); iter++) {
+ for (RecordDecl::field_iterator iter = record->field_begin();
+ iter != record->field_end(); iter++) {
if ((count == 1) || !iter->getType()->isVectorType()) {
S.Diag(Attr.getLoc(), diag::err_attribute_vecreturn_only_vector_member);
return;
@@ -907,7 +911,8 @@
return;
}
- d->addAttr(::new (S.Context) ConstructorAttr(Attr.getLoc(), S.Context, priority));
+ d->addAttr(::new (S.Context) ConstructorAttr(Attr.getLoc(), S.Context,
+ priority));
}
static void HandleDestructorAttr(Decl *d, const AttributeList &Attr, Sema &S) {
@@ -937,7 +942,8 @@
return;
}
- d->addAttr(::new (S.Context) DestructorAttr(Attr.getLoc(), S.Context, priority));
+ d->addAttr(::new (S.Context) DestructorAttr(Attr.getLoc(), S.Context,
+ priority));
}
static void HandleDeprecatedAttr(Decl *d, const AttributeList &Attr, Sema &S) {
@@ -970,7 +976,8 @@
// check the attribute arguments.
int noArgs = Attr.getNumArgs();
if (noArgs > 1) {
- S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << "0 or 1";
+ S.Diag(Attr.getLoc(),
+ diag::err_attribute_wrong_number_arguments) << "0 or 1";
return;
}
// Handle the case where unavailable attribute has a text message.
@@ -1171,7 +1178,7 @@
QualType Ty = V->getType();
if (Ty->isBlockPointerType() || Ty->isFunctionPointerType()) {
const FunctionType *FT = Ty->isFunctionPointerType() ? getFunctionType(d)
- : Ty->getAs<BlockPointerType>()->getPointeeType()->getAs<FunctionType>();
+ : Ty->getAs<BlockPointerType>()->getPointeeType()->getAs<FunctionType>();
if (!cast<FunctionProtoType>(FT)->isVariadic()) {
int m = Ty->isFunctionPointerType() ? 0 : 1;
S.Diag(Attr.getLoc(), diag::warn_attribute_sentinel_not_variadic) << m;
@@ -1187,7 +1194,8 @@
<< Attr.getName() << 6 /*function, method or block */;
return;
}
- d->addAttr(::new (S.Context) SentinelAttr(Attr.getLoc(), S.Context, sentinel, nullPos));
+ d->addAttr(::new (S.Context) SentinelAttr(Attr.getLoc(), S.Context, sentinel,
+ nullPos));
}
static void HandleWarnUnusedResult(Decl *D, const AttributeList &Attr, Sema &S) {
@@ -1333,7 +1341,8 @@
return;
}
- D->addAttr(::new (S.Context) SectionAttr(Attr.getLoc(), S.Context, SE->getString()));
+ D->addAttr(::new (S.Context) SectionAttr(Attr.getLoc(), S.Context,
+ SE->getString()));
}
@@ -1580,7 +1589,8 @@
Attr.setInvalid();
return;
}
- d->addAttr(::new (S.Context) InitPriorityAttr(Attr.getLoc(), S.Context, prioritynum));
+ d->addAttr(::new (S.Context) InitPriorityAttr(Attr.getLoc(), S.Context,
+ prioritynum));
}
/// Handle __attribute__((format(type,idx,firstarg))) attributes based on
@@ -1806,7 +1816,8 @@
S.Diag(ArgExpr->getLocStart(), diag::err_attribute_not_string) <<"annotate";
return;
}
- d->addAttr(::new (S.Context) AnnotateAttr(Attr.getLoc(), S.Context, SE->getString()));
+ d->addAttr(::new (S.Context) AnnotateAttr(Attr.getLoc(), S.Context,
+ SE->getString()));
}
static void HandleAlignedAttr(Decl *D, const AttributeList &Attr, Sema &S) {
@@ -2075,7 +2086,8 @@
return;
}
- d->addAttr(::new (S.Context) NoInstrumentFunctionAttr(Attr.getLoc(), S.Context));
+ d->addAttr(::new (S.Context) NoInstrumentFunctionAttr(Attr.getLoc(),
+ S.Context));
}
static void HandleConstantAttr(Decl *d, const AttributeList &Attr, Sema &S) {
@@ -2400,16 +2412,20 @@
assert(0 && "invalid ownership attribute");
return;
case AttributeList::AT_cf_returns_not_retained:
- d->addAttr(::new (S.Context) CFReturnsNotRetainedAttr(Attr.getLoc(), S.Context));
+ d->addAttr(::new (S.Context) CFReturnsNotRetainedAttr(Attr.getLoc(),
+ S.Context));
return;
case AttributeList::AT_ns_returns_not_retained:
- d->addAttr(::new (S.Context) NSReturnsNotRetainedAttr(Attr.getLoc(), S.Context));
+ d->addAttr(::new (S.Context) NSReturnsNotRetainedAttr(Attr.getLoc(),
+ S.Context));
return;
case AttributeList::AT_cf_returns_retained:
- d->addAttr(::new (S.Context) CFReturnsRetainedAttr(Attr.getLoc(), S.Context));
+ d->addAttr(::new (S.Context) CFReturnsRetainedAttr(Attr.getLoc(),
+ S.Context));
return;
case AttributeList::AT_ns_returns_retained:
- d->addAttr(::new (S.Context) NSReturnsRetainedAttr(Attr.getLoc(), S.Context));
+ d->addAttr(::new (S.Context) NSReturnsRetainedAttr(Attr.getLoc(),
+ S.Context));
return;
};
}
@@ -2553,7 +2569,8 @@
/// ProcessDeclAttributeList - Apply all the decl attributes in the specified
/// attribute list to the specified decl, ignoring any type attributes.
-void Sema::ProcessDeclAttributeList(Scope *S, Decl *D, const AttributeList *AttrList) {
+void Sema::ProcessDeclAttributeList(Scope *S, Decl *D,
+ const AttributeList *AttrList) {
for (const AttributeList* l = AttrList; l; l = l->getNext()) {
ProcessDeclAttribute(S, D, *l, *this);
}
More information about the cfe-commits
mailing list