[PATCH] D18191: [clang-tidy] Add check for function parameters that are const& to builtin types
Etienne Bergeron via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 16 13:07:18 PDT 2016
etienneb added a subscriber: etienneb.
etienneb added a comment.
drive-by, some comments.
================
Comment at: clang-tidy/misc/ConstRefBuiltinCheck.cpp:51
@@ +50,3 @@
+ << Parameter->getFunctionScopeIndex()
+ << Function->getName()
+ << Fix;
----------------
Function is deferenced, but it's assumed possibly null at line 34 -> dyn_cast_or_null
If not, then you should use dyn_cast instead.
================
Comment at: docs/clang-tidy/checks/misc-const-ref-builtin.rst:28
@@ +27,2 @@
+
+The instantion of g will not be flagged.
----------------
nit: instantion -> instantiation
http://reviews.llvm.org/D18191
More information about the cfe-commits
mailing list