[PATCH] D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 13 04:27:16 PDT 2019


hokein added inline comments.


================
Comment at: clang-tidy/google/GlobalVariableDeclarationCheck.cpp:82
   if (const auto *Decl = Result.Nodes.getNodeAs<VarDecl>("global_var")) {
+    if (Decl->isStaticDataMember()) {
+      return;
----------------
nit: removing the `{}`, the same below.


================
Comment at: test/clang-tidy/google-objc-global-variable-declaration.mm:38
 
+class MyTest {
+    static int not_objc_style;
----------------
instead of moving `.m` to `.mm`, I think we can create a new ".mm" file for testing this case.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D59283





More information about the cfe-commits mailing list