[PATCH] D48866: [clang-tidy] Add incorrect-pointer-cast checker

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 12 18:42:32 PDT 2018


Eugene.Zelenko added inline comments.


================
Comment at: clang-tidy/misc/IncorrectPointerCastCheck.cpp:80
+  }
+} // namespace misc
+
----------------
Somehow, misc namespace is closed twice.


================
Comment at: docs/ReleaseNotes.rst:60
 
+- New :doc:`misc-incorrect-pointer-cast
+  <clang-tidy/checks/misc-incorrect-pointer-cast>` check
----------------
Will be good idea to rebase from trunk and use alphabetical order.


================
Comment at: docs/ReleaseNotes.rst:63
+
+  Warn for cases when pointer is cast and the pointed to type is
+  incompatible with allocated memory area type. This may lead to access memory
----------------
Warns. Please also use as much as possible from 80 characters.


================
Comment at: docs/clang-tidy/checks/misc-incorrect-pointer-cast.rst:10
+
+Warn for cases when the pointed to type is wider than the allocated type. 
+For example char vs integer, long vs char etc.
----------------
Looks like two paragraphs are almost same. Will be good idea to rephrase. Please make sure that lines are no longer then 80 characters.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D48866





More information about the cfe-commits mailing list