[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2019-02-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Herald added subscribers: dkrupp, rnkovacs. Herald added a project: LLVM. Please look at recently filed PR40544. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D35937/new/ https://reviews.llvm.org/D35937

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-08-11 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk marked 3 inline comments as done. barancsuk added inline comments. Comment at: test/clang-tidy/readability-static-accessed-through-instance.cpp:55 + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: static member accessed through + // instance

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-08-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. A few late comments. Comment at: clang-tools-extra/trunk/docs/clang-tidy/checks/readability-static-accessed-through-instance.rst:28-29 + + C::foo(); + C::x; + This may be confusing as to whether the check removes the struct

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-08-08 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310371: [clang-tidy] Add new readability non-idiomatic static access check (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D35937?vs=110175=110209#toc Repository: rL LLVM

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-08-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp:23 +

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-08-08 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk added inline comments. Comment at: clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp:23 + memberExpr(hasDeclaration(anyOf(cxxMethodDecl(isStaticStorageClass()), + varDecl(hasStaticStorageDuration(, +

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-08-08 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk updated this revision to Diff 110175. barancsuk marked 4 inline comments as done. barancsuk added a comment. Further reviews addressed https://reviews.llvm.org/D35937 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp:23 + memberExpr(hasDeclaration(anyOf(cxxMethodDecl(isStaticStorageClass()), + varDecl(hasStaticStorageDuration(, +

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-08-01 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk added inline comments. Comment at: clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp:23 + memberExpr(hasDeclaration(anyOf(cxxMethodDecl(isStaticStorageClass()), + varDecl(hasStaticStorageDuration(, +

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-08-01 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk updated this revision to Diff 109120. barancsuk marked 7 inline comments as done. barancsuk added a comment. Address review comments https://reviews.llvm.org/D35937 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/readability-static-accessed-through-instance.cpp:34 + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: static member accessed through instance [readability-static-accessed-through-instance] + // CHECK-FIXES: {{^}}

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-28 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: test/clang-tidy/readability-static-accessed-through-instance.cpp:34 + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: static member accessed through instance [readability-static-accessed-through-instance] + // CHECK-FIXES:

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-28 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I am not sure whether we should copy with such ugly things as overloaded member access operators with side effects, but they can also cause troubles using this fix: #include using std::cout; using std::endl; struct C { static int N;

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-28 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: test/clang-tidy/readability-static-accessed-through-instance.cpp:34 + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: static member accessed through instance [readability-static-accessed-through-instance] + // CHECK-FIXES: {{^}}

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-28 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: test/clang-tidy/readability-static-accessed-through-instance.cpp:34 + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: static member accessed through instance [readability-static-accessed-through-instance] + // CHECK-FIXES:

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp:23 + memberExpr(hasDeclaration(anyOf(cxxMethodDecl(isStaticStorageClass()), + varDecl(hasStaticStorageDuration(, +

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It also seems that your code is not based on trunk, since Release Notes were cleared when version was changed to 6. Please update. Repository: rL LLVM https://reviews.llvm.org/D35937 ___ cfe-commits mailing list

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/readability-static-accessed-through-instance.rst:7 +Checks for member expressions that access static members through instances, and +replaces them with the corresponding expressions that use a more

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-27 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk created this revision. barancsuk added a project: clang-tools-extra. Herald added subscribers: baloghadamsoftware, xazax.hun, whisperity, JDevlieghere, mgorny. Checks for member expressions that access static members through instances, and replaces them with the corresponding