[PATCH] D18191: [clang-tidy] Add check for function parameters that are const& to builtin types
Richard via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 16 09:32:26 PDT 2016
LegalizeAdulthood added inline comments.
================
Comment at: test/clang-tidy/misc-const-ref-builtin.cpp:32-34
@@ +31,4 @@
+
+void f(const int& i, const int& j);
+// CHECK-MESSAGES: :[[@LINE-1]]:19: warning: const reference to 'int' at parameter 'i' in function 'f' [misc-const-ref-builtin]
+// CHECK-MESSAGES: :[[@LINE-2]]:33: warning: const reference to 'int' at parameter 'j' in function 'f' [misc-const-ref-builtin]
----------------
I see tests here only for declarations, and not definitions of functions.
I also don't see any tests for:
- member functions
- template member functions
- template specializations
- tests where function signatures result from macro expansion, either in the body of a macro or as a macro argument
http://reviews.llvm.org/D18191
More information about the cfe-commits
mailing list