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
___
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 [readability-static-accessed-
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 definition
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&id=110209#toc
Repository:
rL LLVM
h
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
+ memberExpr(hasDeclaration(anyOf(cxxMethodDecl(isStaticStorageClass()),
barancsuk added inline comments.
Comment at: clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp:23
+ memberExpr(hasDeclaration(anyOf(cxxMethodDecl(isStaticStorageClass()),
+ varDecl(hasStaticStorageDuration(,
+
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
clang-tidy/readabi
aaron.ballman added inline comments.
Comment at: clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp:23
+ memberExpr(hasDeclaration(anyOf(cxxMethodDecl(isStaticStorageClass()),
+ varDecl(hasStaticStorageDuration(,
+
barancsuk added inline comments.
Comment at: clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp:23
+ memberExpr(hasDeclaration(anyOf(cxxMethodDecl(isStaticStorageClass()),
+ varDecl(hasStaticStorageDuration(,
+
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
clang-tidy/readabili
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: {{^}} C
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: {{^
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;
int
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: {{^}} C::x;
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: {{^
aaron.ballman added inline comments.
Comment at: clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp:23
+ memberExpr(hasDeclaration(anyOf(cxxMethodDecl(isStaticStorageClass()),
+ varDecl(hasStaticStorageDuration(,
+
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
c
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 readable
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 expression
19 matches
Mail list logo