[PATCH] D52120: [analyzer] Treat std::{move, forward} as casts in ExprMutationAnalyzer.

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 17 03:17:30 PDT 2018


JonasToth accepted this revision.
JonasToth added a comment.

The last testcase i mentioned, after that LGTM



================
Comment at: unittests/Analysis/ExprMutationAnalyzerTest.cpp:441
+  Results = match(withEnclosingCompound(declRefTo("x")), AST->getASTContext());
+  EXPECT_FALSE(isMutated(Results, AST.get()));
+
----------------
You could add a final test for 
```
struct S {
  S();
  S(S s);
  S& operator(S s);
};
```
Note that the copy and assignment take by value, so should not resolve in a mutation by move.

Then i think the testsuite covers all potential variants


Repository:
  rC Clang

https://reviews.llvm.org/D52120





More information about the cfe-commits mailing list