NorenaLeonetti added a comment.
In https://reviews.llvm.org/D33826#935394, @lebedev.ri wrote:
> Ping?
Hi, I'm sorry I got a bit busy, I'll get back to it next year.
Repository:
rL LLVM
https://reviews.llvm.org/D33826
___
cfe-commits mailing li
lebedev.ri added a comment.
Ping?
Repository:
rL LLVM
https://reviews.llvm.org/D33826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
lebedev.ri added a comment.
Nice!
/home/eenitot/new_llvm/llvm/lib/Support/ConvertUTFWrapper.cpp:38:26: warning:
do not cast pointers into more strictly aligned pointer types [cert-exp36-c]
UTF16 *targetStart = reinterpret_cast(ResultPtr);
^
Hmm, the text is we
NorenaLeonetti updated this revision to Diff 116510.
Repository:
rL LLVM
https://reviews.llvm.org/D33826
Files:
clang-tidy/cert/AvoidPointerCastToMoreStrictAlignmentCheck.cpp
clang-tidy/cert/AvoidPointerCastToMoreStrictAlignmentCheck.h
clang-tidy/cert/CERTTidyModule.cpp
clang-tidy/cert
NorenaLeonetti added a comment.
In https://reviews.llvm.org/D33826#866145, @lebedev.ri wrote:
> In https://reviews.llvm.org/D33826#866133, @NorenaLeonetti wrote:
>
> > In https://reviews.llvm.org/D33826#861226, @aaron.ballman wrote:
> >
> > > Have you run this check over any large code bases to s
lebedev.ri added a comment.
In https://reviews.llvm.org/D33826#868185, @aaron.ballman wrote:
> Ah, I think I'm catching on to the point you're raising (thank you for
> the patience). If the return type is void *, we don't have enough
> information to sensibly diagnose (not without data flow ana
On Tue, Sep 12, 2017 at 1:02 PM, Roman Lebedev via Phabricator
wrote:
> lebedev.ri added a comment.
>
> In https://reviews.llvm.org/D33826#868185, @aaron.ballman wrote:
>
>> In https://reviews.llvm.org/D33826#868167, @lebedev.ri wrote:
>>
>> > In https://reviews.llvm.org/D33826#868085, @aaron.ball
lebedev.ri added a comment.
In https://reviews.llvm.org/D33826#868185, @aaron.ballman wrote:
> In https://reviews.llvm.org/D33826#868167, @lebedev.ri wrote:
>
> > In https://reviews.llvm.org/D33826#868085, @aaron.ballman wrote:
> >
> > > In https://reviews.llvm.org/D33826#866170, @lebedev.ri wrot
aaron.ballman added a comment.
In https://reviews.llvm.org/D33826#868167, @lebedev.ri wrote:
> In https://reviews.llvm.org/D33826#868085, @aaron.ballman wrote:
>
> > In https://reviews.llvm.org/D33826#866170, @lebedev.ri wrote:
> >
> > > In https://reviews.llvm.org/D33826#866161, @JonasToth wrote
lebedev.ri added a comment.
In https://reviews.llvm.org/D33826#868085, @aaron.ballman wrote:
> In https://reviews.llvm.org/D33826#866170, @lebedev.ri wrote:
>
> > In https://reviews.llvm.org/D33826#866161, @JonasToth wrote:
> >
> > > There is an exception to the general rule (EXP36-C-EX2), statin
aaron.ballman added a comment.
In https://reviews.llvm.org/D33826#867155, @rjmccall wrote:
> In https://reviews.llvm.org/D33826#866170, @lebedev.ri wrote:
>
> > In https://reviews.llvm.org/D33826#866161, @JonasToth wrote:
> >
> > > There is an exception to the general rule (EXP36-C-EX2), stating
aaron.ballman added a comment.
In https://reviews.llvm.org/D33826#866170, @lebedev.ri wrote:
> In https://reviews.llvm.org/D33826#866161, @JonasToth wrote:
>
> > There is an exception to the general rule (EXP36-C-EX2), stating that the
> > result of `malloc` and friends is allowed to be casted t
rjmccall added a comment.
In https://reviews.llvm.org/D33826#866170, @lebedev.ri wrote:
> In https://reviews.llvm.org/D33826#866161, @JonasToth wrote:
>
> > There is an exception to the general rule (EXP36-C-EX2), stating that the
> > result of `malloc` and friends is allowed to be casted to str
lebedev.ri added a comment.
In https://reviews.llvm.org/D33826#866161, @JonasToth wrote:
> There is an exception to the general rule (EXP36-C-EX2), stating that the
> result of `malloc` and friends is allowed to be casted to stricter
> alignments, since the pointer is known to be of correct ali
JonasToth added a comment.
There is an exception to the general rule (EXP36-C-EX2), stating that the
result of `malloc` and friends is allowed to be casted to stricter alignments,
since the pointer is known to be of correct alignment.
Could you add a testcase for this case, i think there would c
lebedev.ri added a comment.
In https://reviews.llvm.org/D33826#866133, @NorenaLeonetti wrote:
> In https://reviews.llvm.org/D33826#861226, @aaron.ballman wrote:
>
> > Have you run this check over any large code bases to see what the quality
> > of the diagnostics are?
>
>
> `-checks=-*,cert-exp3
NorenaLeonetti updated this revision to Diff 114544.
Repository:
rL LLVM
https://reviews.llvm.org/D33826
Files:
clang-tidy/cert/AvoidPointerCastToMoreStrictAlignmentCheck.cpp
clang-tidy/cert/AvoidPointerCastToMoreStrictAlignmentCheck.h
clang-tidy/cert/CERTTidyModule.cpp
clang-tidy/cert
NorenaLeonetti marked an inline comment as done.
NorenaLeonetti added a comment.
In https://reviews.llvm.org/D33826#861226, @aaron.ballman wrote:
> Have you run this check over any large code bases to see what the quality of
> the diagnostics are?
`-checks=-*,cert-exp36-c,modernize-unary-stati
aaron.ballman added a comment.
Have you run this check over any large code bases to see what the quality of
the diagnostics are?
Comment at: docs/clang-tidy/checks/cert-exp36-c.rst:9
+
+This check is the same as `-Wcast-align`, except it checks for
`reinterpret_cast` as well
NorenaLeonetti updated this revision to Diff 113654.
NorenaLeonetti added a comment.
Herald added a subscriber: JDevlieghere.
Added a test for C++ style cast and modified the docs.
Repository:
rL LLVM
https://reviews.llvm.org/D33826
Files:
clang-tidy/cert/AvoidPointerCastToMoreStrictAlignm
lebedev.ri added a comment.
In https://reviews.llvm.org/D33826#772676, @aaron.ballman wrote:
> How does this check compare with the -Wcast-align diagnostic in the Clang
> frontend? I believe that warning already covers these cases, so I'm wondering
> what extra value is added with this check?
rjmccall added a comment.
In https://reviews.llvm.org/D33826#856652, @lebedev.ri wrote:
> In https://reviews.llvm.org/D33826#856619, @Eugene.Zelenko wrote:
>
> > In https://reviews.llvm.org/D33826#856610, @lebedev.ri wrote:
> >
> > > Any status update here? :)
> > > I generally do see a benefit
lebedev.ri added a subscriber: rjmccall.
lebedev.ri added a comment.
In https://reviews.llvm.org/D33826#856619, @Eugene.Zelenko wrote:
> In https://reviews.llvm.org/D33826#856610, @lebedev.ri wrote:
>
> > Any status update here? :)
> > I generally do see a benefit in this check, because `-Wcast-
lebedev.ri added a comment.
In https://reviews.llvm.org/D33826#856619, @Eugene.Zelenko wrote:
> In https://reviews.llvm.org/D33826#856610, @lebedev.ri wrote:
>
> > Any status update here? :)
> > I generally do see a benefit in this check, because `-Wcast-align` (at
> > least currently?) does no
Eugene.Zelenko added a comment.
In https://reviews.llvm.org/D33826#856610, @lebedev.ri wrote:
> Any status update here? :)
> I generally do see a benefit in this check, because `-Wcast-align` (at least
> currently?) does not warn on `reinterpret_cast<>()`.
I think will be good idea to extend
lebedev.ri added a comment.
Any status update here? :)
I generally do see a benefit in this check, because `-Wcast-align` (at least
currently?) does not warn on `reinterpret_cast<>()`.
Repository:
rL LLVM
https://reviews.llvm.org/D33826
___
cfe-
lebedev.ri added a comment.
What will this check say about the following code?
c++
void function(void) {
char c = 'x';
int *ip = reinterpret_cast(&c);
}
The clang'g `-Wcast-align` does not warn: https://godbolt.org/g/hVwD5S
Repository:
rL LLVM
https://reviews.llvm.org/D33826
aaron.ballman added a comment.
Thank you for working on this. How does this check compare with the
-Wcast-align diagnostic in the Clang frontend? I believe that warning already
covers these cases, so I'm wondering what extra value is added with this check?
Repository:
rL LLVM
https://review
lebedev.ri added inline comments.
Comment at:
test/clang-tidy/cert-avoid-pointer-cast-to-more-strict-alignment.c:17
+
+ tmp = (struct foo_header *)(data + offset);
+ // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: do not cast pointers into more
strictly aligned pointer types [ce
NorenaLeonetti created this revision.
NorenaLeonetti added a project: clang-tools-extra.
Herald added subscribers: xazax.hun, mgorny.
Based on CERT-EXP36-C
Repository:
rL LLVM
https://reviews.llvm.org/D33826
Files:
clang-tidy/cert/AvoidPointerCastToMoreStrictAlignmentCheck.cpp
clang-tidy
30 matches
Mail list logo