[PATCH] D18765: [clang-tidy] Don't complain about const pass_object_size params in declarations

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 5 02:06:13 PDT 2016


alexfh requested changes to this revision.
alexfh added a comment.
This revision now requires changes to proceed.

There's a principal difference between top-level `const` on parameters in definitions and in declarations: in definitions `const` has an effect, as it makes the variable constant, but in declarations it has absolutely no effect. Since declarations usually represent the function's interface, and top-level `const` on parameters doesn't change the function's signature, it's considered useless and misleading when used on declarations. Long story short, I don't see any value in this change.


http://reviews.llvm.org/D18765





More information about the cfe-commits mailing list