Index: cfe/trunk/unittests/Analysis/ExprMutationAnalyzerTest.cpp =================================================================== --- cfe/trunk/unittests/Analysis/ExprMutationAnalyzerTest.cpp +++ cfe/trunk/unittests/Analysis/ExprMutationAnalyzerTest.cpp @@ -1108,4 +1108,23 @@ EXPECT_THAT(mutatedBy(Results, AST.get()), ElementsAre("x->mf()")); } +TEST(ExprMutationAnalyzerTest, ReproduceFailureMinimal) { + const std::string Reproducer = + "namespace std {" + "template T forward(T & A) { return static_cast(A); }" + "template struct __bind {" + " T f;" + " template __bind(T v, V &&) : f(forward(v)) {}" + "};" + "}" + "void f() {" + " int x = 42;" + " auto Lambda = [] {};" + " std::__bind(Lambda, x);" + "}"; + auto AST11 = buildASTFromCodeWithArgs(Reproducer, {"-std=c++11"}); + auto Results11 = + match(withEnclosingCompound(declRefTo("x")), AST11->getASTContext()); + EXPECT_FALSE(isMutated(Results11, AST11.get())); +} } // namespace clang