reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/unittests/AST/ASTContextParentMapTest.cpp
   88   auto &TU = *Ctx.getTranslationUnitDecl();
   89   auto &Foo = *TU.lookup(&Ctx.Idents.get("foo")).front();
   90   auto &Bar = *cast<DeclContext>(Foo).lookup(&Ctx.Idents.get("bar")).front();
   94   EXPECT_THAT(Ctx.getParents(Bar), ElementsAre(DynTypedNode::create(Foo)));
   95   EXPECT_THAT(Ctx.getParents(Foo), ElementsAre(DynTypedNode::create(TU)));
   98   Ctx.setTraversalScope({&Foo});
   99   EXPECT_THAT(Ctx.getParents(Bar), ElementsAre(DynTypedNode::create(Foo)));
  100   EXPECT_THAT(Ctx.getParents(Foo), ElementsAre());
  103   Ctx.setTraversalScope({&TU});
  104   EXPECT_THAT(Ctx.getParents(Bar), ElementsAre(DynTypedNode::create(Foo)));
  105   EXPECT_THAT(Ctx.getParents(Foo), ElementsAre(DynTypedNode::create(TU)));