sorenj added a comment.
My colleague pointed out that -Wsigned-conversion will not detect this very
frequent mistake
for (size_t i = 0; i < v.size() - 1; ++i)
It is my contention, and I think it's pretty well substantiated by reviewing
cases where this detector fails that no coder ever reall
sorenj added a comment.
So, I ran this check against the cxx directory of llvm, it fired 5 times so
let's look at the context and disucss:
There are two identical spots in locale.cpp, the first is around line 2717
uint16_t t = static_cast(
0xD800
| wc & 0x1F) >> 16
sorenj added a comment.
Okay, but as you can see the majority of my test cases are intentionally false
negatives `- -Wsign-conversion` triggers so often than many people don't use
it. And, `unsigned x = 2;` does not trigger a sign conversion warning despite
there being a conversion form 2 to 2u
sorenj added a comment.
Anything further needed?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71607/new/
https://reviews.llvm.org/D71607
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:/
sorenj updated this revision to Diff 237471.
sorenj added a comment.
- Remove double space.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71607/new/
https://reviews.llvm.org/D71607
Files:
clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.
sorenj updated this revision to Diff 237466.
sorenj added a comment.
- Address documentation comments.
- Address documentation comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71607/new/
https://reviews.llvm.org/D71607
Files:
clang-tools-
sorenj added a comment.
First time so trying to follow similar recent submits. PTAL.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71607/new/
https://reviews.llvm.org/D71607
___
cfe-commits mailing lis
sorenj updated this revision to Diff 237440.
sorenj added a comment.
- Merge branch 'master' of https://github.com/llvm/llvm-project
- Add documentation and release notes, fix spelling error.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71607/new/
sorenj added a comment.
Friendly ping - anything further I need to do here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71607/new/
https://reviews.llvm.org/D71607
___
cfe-commits mailing list
cfe-com
sorenj marked an inline comment as done.
sorenj added inline comments.
Comment at:
clang-tools-extra/clang-tidy/bugprone/UnsignedSubtractionCheck.cpp:21
+
+void UnsignedSubtractionCheck::registerMatchers(MatchFinder *Finder) {
+ const auto UnsignedIntType = hasType(isUnsignedIn
sorenj updated this revision to Diff 234294.
sorenj added a comment.
Address requested whitespace changes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71607/new/
https://reviews.llvm.org/D71607
Files:
clang-tools-extra/clang-tidy/bugprone/Bugp
sorenj created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Many C++ programmers are unaware that an expression of unsigned - signed will
promote the signed argument to unsigned, and the resulting underflow produces
a large positive rather than negative res
12 matches
Mail list logo