================ @@ -10,6 +10,12 @@ template <typename T> void type_dependent_variables() { T value = 42; auto &ref = value; + // CHECK-MESSAGES:[[@LINE-1]]:3: warning: variable 'ref' of type 'int &' can be declared 'const' + // CHECK-FIXES: auto const&ref = value; ---------------- localspook wrote:
It actually produces this formatting, yep. Here it is on an existing test for example: https://github.com/llvm/llvm-project/blob/ac60477295ef6c3683dd862984a7fcedb1a352d9/clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values.cpp#L840-L842 https://github.com/llvm/llvm-project/pull/157319 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits