[PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

Mehdi AMINI via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 10 10:05:20 PST 2016


mehdi_amini added inline comments.


================
Comment at: clang-tools-extra/trunk/change-namespace/ChangeNamespace.cpp:396
+  // Calculate the name of the `NsDecl` after it is moved to new namespace.
+  std::string OldNs = NsDecl->getQualifiedNameAsString();
+  llvm::StringRef Postfix = OldNs;
----------------
You shouldn't dereference after a `dyn_cast`. Either null-check or use `cast`.


Repository:
  rL LLVM

https://reviews.llvm.org/D24183





More information about the cfe-commits mailing list