[PATCH] D62404: [clang-tidy] Fix null pointer dereference in readability-identifier-naming

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 27 01:42:53 PDT 2019


hokein added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:804
+        if (const auto *Typedef = TypePtr->getAs<TypedefType>()) {
+          addUsage(NamingCheckFailures, Typedef->getDecl(),
+                   Value->getSourceRange());
----------------
We are risky of dereferencing a nullptr, as the `TypePtr` can be null now.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62404/new/

https://reviews.llvm.org/D62404





More information about the cfe-commits mailing list