/// \brief Set whether the declaration is used, in the sense of odr-use.
///
/// This should only be used immediately after creating a declaration.
- void setIsUsed(bool U) { Used = U; }
+ void setIsUsed() { Used = true; }
/// \brief Mark the declaration used, in the sense of odr-use.
///
New->setPure();
// Merge "used" flag.
- New->setIsUsed(Old->getMostRecentDecl()->isUsed(false));
+ if (Old->getMostRecentDecl()->isUsed(false))
+ New->setIsUsed();
// Merge attributes from the parameters. These can mismatch with K&R
// declarations.
}
// Merge "used" flag.
- New->setIsUsed(Old->getMostRecentDecl()->isUsed(false));
+ if (Old->getMostRecentDecl()->isUsed(false))
+ New->setIsUsed();
// Keep a chain of previous declarations.
New->setPreviousDecl(Old);
NewVar->setAccess(OldVar->getAccess());
if (!OldVar->isStaticDataMember()) {
- NewVar->setIsUsed(OldVar->isUsed(false));
+ if (OldVar->isUsed(false))
+ NewVar->setIsUsed();
NewVar->setReferenced(OldVar->isReferenced());
}
D->setAttrsImpl(Attrs, Reader.getContext());
}
D->setImplicit(Record[Idx++]);
- D->setIsUsed(Record[Idx++]);
+ D->Used = Record[Idx++];
D->setReferenced(Record[Idx++]);
D->setTopLevelDeclInObjCContainer(Record[Idx++]);
D->setAccess((AccessSpecifier)Record[Idx++]);
case UPD_DECL_MARKED_USED: {
// FIXME: This doesn't send the right notifications if there are
// ASTMutationListeners other than an ASTWriter.
- D->setIsUsed(true);
+ D->Used = true;
break;
}
}