diff options
Diffstat (limited to '')
-rw-r--r-- | tools/clang-tidy/test/readability-const-return-type.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/clang-tidy/test/readability-const-return-type.cpp b/tools/clang-tidy/test/readability-const-return-type.cpp new file mode 100644 index 0000000000..695ed1d83f --- /dev/null +++ b/tools/clang-tidy/test/readability-const-return-type.cpp @@ -0,0 +1,5 @@ +const int p1() { +// CHECK-MESSAGES: [[@LINE-1]]:1: warning: return type 'const int' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness +// CHECK-FIXES: int p1() { + return 1; +} |