alexfh added inline comments.
================ Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:27 + // skip those too. + Finder->addMatcher(functionDecl(returns(qualType( + isConstQualified(), ---------------- How about just matching definitions to avoid duplicate warnings? ================ Comment at: test/clang-tidy/readability-const-value-return.cpp:1 +// RUN: %check_clang_tidy %s readability-const-value-return %t + ---------------- Please add tests for: 1. a function with multiple declarations and a definition 2. function declarations/definitions in macros 3. a class method 4. implicit stuff (I'm not sure if a lambda can be made to return a const type without an explicit return type specification) ================ Comment at: test/clang-tidy/readability-const-value-return.cpp:50 +template <typename T> +const T f_returns_template_param(); + ---------------- It would be nice to ensure the check doesn't trigger on template instantiation of this function as well. Repository: rL LLVM https://reviews.llvm.org/D33531 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits