reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
263 match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); 264 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)")); 266 AST = buildASTFromCode("typedef int& IntRef;" 268 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); 269 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)")); 271 AST = buildASTFromCode("template <class T> using TRef = T&;" 273 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); 274 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)")); 276 AST = buildASTFromCode( 280 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); 281 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g<int>(x)")); 283 AST = buildASTFromCode("typedef int* IntPtr;" 285 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); 286 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)")); 288 AST = buildASTFromCode("typedef int* IntPtr; typedef IntPtr& IntPtrRef;" 290 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); 291 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("g(x)")); 293 AST = buildASTFromCode( 295 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); 296 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x + 1")); 298 AST = buildASTFromCode("void f() { struct A { A(int&); }; int x; A y(x); }"); 299 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); 300 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x")); 302 AST = buildASTFromCode("void f() { struct A { A(); A(A&); }; A x; A y(x); }"); 303 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); 304 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x")); 306 AST = buildASTFromCode( 309 Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext()); 310 EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("A<0>::mf(x)"));