sbenza added inline comments.

================
Comment at: clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.cpp:44
@@ +43,3 @@
+  if (MatchedCast->getCastKind() == CK_BitCast ||
+      MatchedCast->getCastKind() == CK_LValueBitCast ||
+      MatchedCast->getCastKind() == CK_IntegralToPointer ||
----------------
Seems to be missing CK_ReinterpretMemberPointer

================
Comment at: clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.cpp:48
@@ +47,3 @@
+    diag(MatchedCast->getLocStart(),
+         "do not use c-style cast to perform a reinterpret_cast");
+    return;
----------------
From reading warning this I would think the way to fix the code is to use a 
reinterpret_cast directly, but that is also against the guidelines.

================
Comment at: clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.cpp:55
@@ +54,3 @@
+  if (MatchedCast->getCastKind() == CK_BaseToDerived) {
+
+    const auto *SourceDecl = SourceType->getPointeeCXXRecordDecl();
----------------
remove blank line


http://reviews.llvm.org/D14096



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to