Anastasia added inline comments. ================ Comment at: lib/Sema/SemaDeclAttr.cpp:5823 @@ -5788,8 +5822,3 @@ - // Walk the declarator structure, applying decl attributes that were in a type - // position to the decl itself. This handles cases like: - // int *__attr__(x)** D; - // when X is a decl attribute. - for (unsigned i = 0, e = PD.getNumTypeObjects(); i != e; ++i) - if (const AttributeList *Attrs = PD.getTypeObject(i).getAttrs()) - ProcessDeclAttributeList(S, D, Attrs, /*IncludeCXX11Attributes=*/false); + // Skip pipe type, otherwise it will be processed twice with its element type + const ParmVarDecl *PDecl = llvm::dyn_cast<ParmVarDecl>(D); ---------------- aaron.ballman wrote: > Anastasia wrote: > > . missing > Missing punctuation. > > Of bigger concern -- this code is highly suspect -- this is called for every > declaration in the source code. Why is this complexity needed here instead of > elsewhere? I assume we could do this check in ProcessDeclAttributeList or just after: if (const AttributeList *Attrs = PD.getTypeObject(i).getAttrs())
http://reviews.llvm.org/D16040 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits