JonasToth added a comment. Please add a test for the same usecase as in Sema.
template <typename T> struct SizeIndicator { constexpr int value = 8; }; template <> struct SizeIndicator<int> { constexpr int value = 4; }; template <typename Foo> void fooFunction() { char Characters[SizeIndicator<Foo>::value]; void ArrayToPointerDecay(Characters); } template <> void fooFunction<int>() { char Character[SizeIndicator<int>::value]; void ArrayToPointerDecay(Characters); } In both cases the mutation must be detected. I assume the function specialization is diagnosed correctly, because everything is resolved. ================ Comment at: unittests/clang-tidy/ExprMutationAnalyzerTest.cpp:454 + + AST = + tooling::buildASTFromCode("template <class T> void f() { T x; x.y.z; }"); ---------------- 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. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50619 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits