Address review comments on r208954. No functional changes.

llvm-svn: 209111
This commit is contained in:
Daniel Jasper 2014-05-19 07:23:03 +00:00
parent f82f16e3e6
commit 993a906af3
1 changed files with 6 additions and 7 deletions

View File

@ -88,9 +88,9 @@ void UseOverride::check(const MatchFinder::MatchResult &Result) {
StringRef ReplacementText = "override ";
if (Method->hasAttrs()) {
for (const clang::Attr *attr : Method->getAttrs()) {
if (!attr->isImplicit()) {
InsertLoc = Sources.getExpansionLoc(attr->getLocation());
for (const clang::Attr *A : Method->getAttrs()) {
if (!A->isImplicit()) {
InsertLoc = Sources.getExpansionLoc(A->getLocation());
break;
}
}
@ -117,11 +117,10 @@ void UseOverride::check(const MatchFinder::MatchResult &Result) {
}
if (Method->isVirtualAsWritten()) {
for (unsigned i = 0, e = Tokens.size(); i != e; ++i) {
if (Tokens[i].is(tok::raw_identifier) &&
GetText(Tokens[i], Sources) == "virtual") {
for (Token Tok : Tokens) {
if (Tok.is(tok::raw_identifier) && GetText(Tok, Sources) == "virtual") {
Diag << FixItHint::CreateRemoval(CharSourceRange::getTokenRange(
Tokens[i].getLocation(), Tokens[i].getLocation()));
Tok.getLocation(), Tok.getLocation()));
break;
}
}