forked from OSchip/llvm-project
Minor tweak to my last patch per Doug's comment.
llvm-svn: 133731
This commit is contained in:
parent
72d91dd6e4
commit
d0cb83a6ab
|
@ -575,11 +575,13 @@ template <typename T>
|
|||
void Decl::dropAttr() {
|
||||
if (!HasAttrs) return;
|
||||
AttrVec &Attrs = getASTContext().getDeclAttrs(this);
|
||||
for (unsigned i = 0, e = Attrs.size(); i != e; ++i) {
|
||||
for (unsigned i = 0, e = Attrs.size(); i != e; /* in loop */) {
|
||||
if (isa<T>(Attrs[i])) {
|
||||
Attrs.erase(Attrs.begin() + i);
|
||||
--i, --e;
|
||||
--e;
|
||||
}
|
||||
else
|
||||
++i;
|
||||
}
|
||||
if (Attrs.empty())
|
||||
HasAttrs = false;
|
||||
|
|
Loading…
Reference in New Issue