This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE334829: [clang-tidy] This patch is a fix for D45405 where
spaces were mistakenly… (authored by zinovy.nis, committed by ).
Changed prior to commit:
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
LG
https://reviews.llvm.org/D45927
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
zinovy.nis marked an inline comment as done.
zinovy.nis added a comment.
Alexander, can you please have a look at the latest patch? Thanks.
https://reviews.llvm.org/D45927
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
zinovy.nis marked an inline comment as done.
zinovy.nis added inline comments.
Comment at: modernize/UseAutoCheck.cpp:40
+? Alpha
+: (std::isspace(C) || (!RemoveStars && C == '*')) ? Space
+ :
zinovy.nis updated this revision to Diff 146677.
zinovy.nis added a comment.
- Fix for templated type names. Thanks AlexanderK for pointing.
https://reviews.llvm.org/D45927
Files:
clang-tidy/modernize/UseAutoCheck.cpp
docs/clang-tidy/checks/modernize-use-auto.rst
alexfh added inline comments.
Comment at: clang-tidy/modernize-use-auto-min-type-name-length.cpp:61-83
+long int li = static_cast(foo());
+// CHECK-FIXES-0-0: auto li = {{.*}}
+// CHECK-FIXES-0-5: auto li = {{.*}}
+// CHECK-FIXES-1-0: auto li = {{.*}}
+//
rsmith added inline comments.
Comment at: modernize/UseAutoCheck.cpp:40
+? Alpha
+: (std::isspace(C) || (!RemoveStars && C == '*')) ? Space
+ : Punctuation;
`isspace` here is
zinovy.nis added inline comments.
Comment at: clang-tidy/modernize-use-auto-min-type-name-length.cpp:61-83
+long int li = static_cast(foo());
+// CHECK-FIXES-0-0: auto li = {{.*}}
+// CHECK-FIXES-0-5: auto li = {{.*}}
+// CHECK-FIXES-1-0: auto li = {{.*}}
+
zinovy.nis added inline comments.
Comment at: clang-tidy/modernize-use-auto-min-type-name-length.cpp:61-83
+long int li = static_cast(foo());
+// CHECK-FIXES-0-0: auto li = {{.*}}
+// CHECK-FIXES-0-5: auto li = {{.*}}
+// CHECK-FIXES-1-0: auto li = {{.*}}
+
zinovy.nis added inline comments.
Comment at: clang-tidy/modernize-use-auto-min-type-name-length.cpp:61-83
+long int li = static_cast(foo());
+// CHECK-FIXES-0-0: auto li = {{.*}}
+// CHECK-FIXES-0-5: auto li = {{.*}}
+// CHECK-FIXES-1-0: auto li = {{.*}}
+
alexfh requested changes to this revision.
alexfh added inline comments.
This revision now requires changes to proceed.
Comment at: clang-tidy/modernize-use-auto-min-type-name-length.cpp:61-83
+long int li = static_cast(foo());
+// CHECK-FIXES-0-0: auto li = {{.*}}
+
zinovy.nis updated this revision to Diff 144727.
zinovy.nis added a comment.
- Applied Alexander's changes.
https://reviews.llvm.org/D45927
Files:
clang-tidy/checks/modernize-use-auto.rst
clang-tidy/modernize-use-auto-min-type-name-length.cpp
modernize/UseAutoCheck.cpp
Index:
alexfh added a comment.
In https://reviews.llvm.org/D45927#1083051, @zinovy.nis wrote:
> > I think, it's 13, if you choose to remove stars, and 17 otherwise. The
> > difference is excessive spaces vs. required ones. Implementing proper logic
> > may be involved, but we can simplify it to
zinovy.nis added a comment.
> I think, it's 13, if you choose to remove stars, and 17 otherwise. The
> difference is excessive spaces vs. required ones. Implementing proper logic
> may be involved, but we can simplify it to something like "count all
> non-space characters and a single space
alexfh added a comment.
Actually, just ignoring spaces may be not the best option.
In https://reviews.llvm.org/D45927#1074593, @zinovy.nis wrote:
> > I think spaces that will be removed should be counted - long long is 9.
>
> I thought about it, but what about "long long int
zinovy.nis added inline comments.
Comment at: clang-tidy/modernize/UseAutoCheck.cpp:33
+
+bool IsNotSpace(const char& C) {
+ return !std::isspace(static_cast(C));
alexfh wrote:
> Why `const char&` and not just `char`? Moreover, these two functions can be
>
alexfh requested changes to this revision.
alexfh added inline comments.
This revision now requires changes to proceed.
Comment at: clang-tidy/modernize/UseAutoCheck.cpp:33
+
+bool IsNotSpace(const char& C) {
+ return !std::isspace(static_cast(C));
Why `const
zinovy.nis added a comment.
Gentle ping.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D45927
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
> I think spaces that will be removed should be counted - long long is 9.
I thought about it, but what about "long long int
** * *"? Is it still 9?
I think it's a business of clang-format to remove excessive spaces, not of
clang-tidy.
вс, 22 апр. 2018 г. в
zinovy.nis added a subscriber: malcolm.parsons.
zinovy.nis added a comment.
> I think spaces that will be removed should be counted - long long is 9.
I thought about it, but what about "long long int
- * * *"? Is it still 9?
I think it's a business of clang-format to
malcolm.parsons added a comment.
I think spaces that will be removed should be counted - long long is 9.
OTOH, MinTypeNameLength isn't likely to be set high enough for that to matter.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D45927
zinovy.nis created this revision.
zinovy.nis added reviewers: malcolm.parsons, alexfh.
zinovy.nis added a project: clang-tools-extra.
Herald added subscribers: cfe-commits, xazax.hun.
This patch is a fix for https://reviews.llvm.org/D45405 where spaces were also
considered as a part of a type
22 matches
Mail list logo