[PATCH] D50619: [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 13 09:24:28 PDT 2018


JonasToth added inline comments.


================
Comment at: unittests/clang-tidy/ExprMutationAnalyzerTest.cpp:454
+
+  AST =
+      tooling::buildASTFromCode("template <class T> void f() { T x; x.y.z; }");
----------------
JonasToth wrote:
> Is there already a test for a method from a templated type?
> 
> E.g.
> ```
> template <typename T>
> struct Foo {
>   T x;
>   Foo() { int local_int; x(local_int); }
> };
> ```
> One can not say that `local_int` could be const or not.
`x.method(local_int);` would be interesting, just for security, given that the first case is an operator overload and the second one a classical method call.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D50619





More information about the cfe-commits mailing list