[clang-tools-extra] r219063 - [clang-modernize] Update for API change.
Benjamin Kramer
benny.kra at googlemail.com
Sat Oct 4 10:19:03 PDT 2014
Author: d0k
Date: Sat Oct 4 12:19:03 2014
New Revision: 219063
URL: http://llvm.org/viewvc/llvm-project?rev=219063&view=rev
Log:
[clang-modernize] Update for API change.
NFC.
Modified:
clang-tools-extra/trunk/clang-modernize/UseNullptr/NullptrActions.cpp
Modified: clang-tools-extra/trunk/clang-modernize/UseNullptr/NullptrActions.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/UseNullptr/NullptrActions.cpp?rev=219063&r1=219062&r2=219063&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-modernize/UseNullptr/NullptrActions.cpp (original)
+++ clang-tools-extra/trunk/clang-modernize/UseNullptr/NullptrActions.cpp Sat Oct 4 12:19:03 2014
@@ -383,27 +383,27 @@ private:
assert(MacroLoc.isFileID());
do {
- ASTContext::ParentVector Parents = Context.getParents(Start);
+ const auto &Parents = Context.getParents(Start);
if (Parents.empty())
return false;
assert(Parents.size() == 1 &&
"Found an ancestor with more than one parent!");
- ASTContext::ParentVector::const_iterator I = Parents.begin();
+ const ast_type_traits::DynTypedNode &Parent = Parents[0];
SourceLocation Loc;
- if (const Decl *D = I->get<Decl>())
+ if (const Decl *D = Parent.get<Decl>())
Loc = D->getLocStart();
- else if (const Stmt *S = I->get<Stmt>())
+ else if (const Stmt *S = Parent.get<Stmt>())
Loc = S->getLocStart();
else
llvm_unreachable("Expected to find Decl or Stmt containing ancestor");
if (!expandsFrom(Loc, MacroLoc)) {
- Result = *I;
+ Result = Parent;
return true;
}
- Start = *I;
+ Start = Parent;
} while (1);
llvm_unreachable("findContainingAncestor");
More information about the cfe-commits
mailing list