[PATCH] D60629: [clang-tidy] Change the namespace for llvm checkers from 'llvm' to 'llvm_check'

Don Hinton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 15:10:43 PDT 2019


hintonda marked an inline comment as done.
hintonda added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/rename_check.py:267
 
-  if old_module != new_module:
+  if old_module != new_module or new_module == 'llvm':
+    if new_module == 'llvm':
----------------
alexfh wrote:
> I believe, we should first construct the new namespace name (using exactly the same code as in add_new_check.py) and then check if it differs from the old one.
Changed this back to the original check which was clearer and easier for the reader to grok.

We are checking two distinct things here, so be explicit.  First, we check to see if the modules changed, e.g., from say from 'google' to 'modernize', then we check to see if the new module is 'llvm' and needs special handling.

Then, and only then, do we need to set the new_namespace variable, and we condition that on whether or not the new module name is 'llvm'.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60629





More information about the cfe-commits mailing list