clang-tidy and 3.7 release notes

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

clang-tidy and 3.7 release notes

Joan Lluch via cfe-dev
Hi,

It was pointed out to me that there's been a bunch of work on new
checkers, but there's no mention of this in the 3.7 release notes.

Would someone be willing to write something about this?

Cheers,
Hans
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang-tidy and 3.7 release notes

Joan Lluch via cfe-dev

I'll try to come up with a short summary. Where exactly should the text go?

-- Alex

On 14 Aug 2015 20:22, "Hans Wennborg" <[hidden email]> wrote:
Hi,

It was pointed out to me that there's been a bunch of work on new
checkers, but there's no mention of this in the 3.7 release notes.

Would someone be willing to write something about this?

Cheers,
Hans

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang-tidy and 3.7 release notes

Joan Lluch via cfe-dev
I figured in Clang's release notes, docs/ReleaseNotes.rst on the 3.7
branch: http://llvm.org/viewvc/llvm-project/cfe/branches/release_37/docs/ReleaseNotes.rst?view=log

If you don't want to check out the branch, you can also just send me
some text and I'll commit it.

Thanks,
Hans

On Sun, Aug 16, 2015 at 7:04 PM, Alexander Kornienko <[hidden email]> wrote:

> I'll try to come up with a short summary. Where exactly should the text go?
>
> -- Alex
>
> On 14 Aug 2015 20:22, "Hans Wennborg" <[hidden email]> wrote:
>>
>> Hi,
>>
>> It was pointed out to me that there's been a bunch of work on new
>> checkers, but there's no mention of this in the 3.7 release notes.
>>
>> Would someone be willing to write something about this?
>>
>> Cheers,
>> Hans
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang-tidy and 3.7 release notes

Joan Lluch via cfe-dev
On Mon, Aug 17, 2015 at 6:53 PM, Hans Wennborg <[hidden email]> wrote:
I figured in Clang's release notes, docs/ReleaseNotes.rst on the 3.7
branch: http://llvm.org/viewvc/llvm-project/cfe/branches/release_37/docs/ReleaseNotes.rst?view=log

If you don't want to check out the branch, you can also just send me
some text and I'll commit it.


OK, clang-tidy summary of changes from 3.6.2 final:

Added new checks:
  * google-global-names-in-headers: flag global namespace pollution in header files.
  * misc-assert-side-effect: detects `assert()` conditions with side effects which can cause different behavior in debug / release builds.
  * misc-assign-operator-signature: finds declarations of assign operators with the wrong return and/or argument types.
  * misc-inaccurate-erase: warns when some elements of a container are not removed due to using the `erase()` algorithm incorrectly.
  * misc-inefficient-algorithm: warns on inefficient use of STL algorithms on associative containers.
  * misc-macro-parentheses: finds macros that can have unexpected behavior due to missing parentheses.
  * misc-macro-repeated-side-effects: checks for repeated argument with side effects in macros.
  * misc-noexcept-move-constructor: flags user-defined move constructors and assignment operators not marked with `noexcept` or marked with `noexcept(expr)` where `expr` evaluates to `false` (but is not a `false` literal itself).
  * misc-static-assert: replaces `assert()` with `static_assert()` if the condition is evaluatable at compile time.
  * readability-container-size-empty: checks whether a call to the `size()` method can be replaced with a call to `empty()`.
  * readability-else-after-return: flags conditional statements having the `else` branch, when the `true` branch has a `return` as the last statement.
  * readability-redundant-string-cstr: finds unnecessary calls to `std::string::c_str()`.
  * readability-shrink-to-fit: replaces copy and swap tricks on shrinkable containers with the `shrink_to_fit()` method call.
  * readability-simplify-boolean-expr: looks for boolean expressions involving boolean constants and simplifies them to use the appropriate boolean expression directly (`if (x == true) ... -> if (x)`, etc.)

+ minor fixes and improvements
 

Thanks,
Hans

On Sun, Aug 16, 2015 at 7:04 PM, Alexander Kornienko <[hidden email]> wrote:
> I'll try to come up with a short summary. Where exactly should the text go?
>
> -- Alex
>
> On 14 Aug 2015 20:22, "Hans Wennborg" <[hidden email]> wrote:
>>
>> Hi,
>>
>> It was pointed out to me that there's been a bunch of work on new
>> checkers, but there's no mention of this in the 3.7 release notes.
>>
>> Would someone be willing to write something about this?
>>
>> Cheers,
>> Hans

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang-tidy and 3.7 release notes

Joan Lluch via cfe-dev

In article <CAOweq9+cUTyTKJd-+ex5wnfW4q+jZ8hHjfaztxzOSz879C=[hidden email]>,
    Alexander Kornienko via cfe-dev <[hidden email]> writes:

> OK, clang-tidy summary of changes from 3.6.2 final:

Nice!

Is clang-tidy, clang-modernize, etc., getting included in the built
distributions yet?
<https://llvm.org/bugs/show_bug.cgi?id=22765>
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang-tidy and 3.7 release notes

Joan Lluch via cfe-dev
In reply to this post by Joan Lluch via cfe-dev
On Tue, Aug 18, 2015 at 10:14 AM, Alexander Kornienko <[hidden email]> wrote:

> On Mon, Aug 17, 2015 at 6:53 PM, Hans Wennborg <[hidden email]> wrote:
>>
>> I figured in Clang's release notes, docs/ReleaseNotes.rst on the 3.7
>> branch:
>> http://llvm.org/viewvc/llvm-project/cfe/branches/release_37/docs/ReleaseNotes.rst?view=log
>>
>> If you don't want to check out the branch, you can also just send me
>> some text and I'll commit it.
>
>
>
> OK, clang-tidy summary of changes from 3.6.2 final:
>
> Added new checks:
>   * google-global-names-in-headers: flag global namespace pollution in
> header files.
>   * misc-assert-side-effect: detects `assert()` conditions with side effects
> which can cause different behavior in debug / release builds.
>   * misc-assign-operator-signature: finds declarations of assign operators
> with the wrong return and/or argument types.
>   * misc-inaccurate-erase: warns when some elements of a container are not
> removed due to using the `erase()` algorithm incorrectly.
>   * misc-inefficient-algorithm: warns on inefficient use of STL algorithms
> on associative containers.
>   * misc-macro-parentheses: finds macros that can have unexpected behavior
> due to missing parentheses.
>   * misc-macro-repeated-side-effects: checks for repeated argument with side
> effects in macros.
>   * misc-noexcept-move-constructor: flags user-defined move constructors and
> assignment operators not marked with `noexcept` or marked with
> `noexcept(expr)` where `expr` evaluates to `false` (but is not a `false`
> literal itself).
>   * misc-static-assert: replaces `assert()` with `static_assert()` if the
> condition is evaluatable at compile time.
>   * readability-container-size-empty: checks whether a call to the `size()`
> method can be replaced with a call to `empty()`.
>   * readability-else-after-return: flags conditional statements having the
> `else` branch, when the `true` branch has a `return` as the last statement.
>   * readability-redundant-string-cstr: finds unnecessary calls to
> `std::string::c_str()`.
>   * readability-shrink-to-fit: replaces copy and swap tricks on shrinkable
> containers with the `shrink_to_fit()` method call.
>   * readability-simplify-boolean-expr: looks for boolean expressions
> involving boolean constants and simplifies them to use the appropriate
> boolean expression directly (`if (x == true) ... -> if (x)`, etc.)


Many thanks! r245328.

 - Hans
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang-tidy and 3.7 release notes

Joan Lluch via cfe-dev
In reply to this post by Joan Lluch via cfe-dev
On Tue, Aug 18, 2015 at 11:00 AM, Richard via cfe-dev
<[hidden email]> wrote:

>
> In article <CAOweq9+cUTyTKJd-+ex5wnfW4q+jZ8hHjfaztxzOSz879C=[hidden email]>,
>     Alexander Kornienko via cfe-dev <[hidden email]> writes:
>
>> OK, clang-tidy summary of changes from 3.6.2 final:
>
> Nice!
>
> Is clang-tidy, clang-modernize, etc., getting included in the built
> distributions yet?
> <https://llvm.org/bugs/show_bug.cgi?id=22765>

I hadn't seen this bug :-(

Unfortunately it seems the release script isn't building the code in
clang-tools-extra. This is easy to fix, but I'm unsure whether doing
so at this point in the release is a good idea.

 - Hans
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang-tidy and 3.7 release notes

Joan Lluch via cfe-dev


On Tue, Aug 18, 2015 at 8:47 PM, Hans Wennborg via cfe-dev <[hidden email]> wrote:
On Tue, Aug 18, 2015 at 11:00 AM, Richard via cfe-dev
<[hidden email]> wrote:
>
> In article <CAOweq9+cUTyTKJd-+ex5wnfW4q+jZ8hHjfaztxzOSz879C=[hidden email]>,
>     Alexander Kornienko via cfe-dev <[hidden email]> writes:
>
>> OK, clang-tidy summary of changes from 3.6.2 final:
>
> Nice!
>
> Is clang-tidy, clang-modernize, etc., getting included in the built
> distributions yet?
> <https://llvm.org/bugs/show_bug.cgi?id=22765>

I hadn't seen this bug :-(

Unfortunately it seems the release script isn't building the code in
clang-tools-extra. This is easy to fix, but I'm unsure whether doing
so at this point in the release is a good idea.

I see you've decided to try including clang-tools-extra tools to the release. As it turns out to be the first release containing clang-tidy, it may make sense to describe either all existing checks or none of them, and additionally add a top-level description of clang-tidy itself (can send you tomorrow). WDYT?

-- Alex
 

 - Hans
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang-tidy and 3.7 release notes

Joan Lluch via cfe-dev
On Tue, Aug 18, 2015 at 4:01 PM, Alexander Kornienko <[hidden email]> wrote:

>
>
> On Tue, Aug 18, 2015 at 8:47 PM, Hans Wennborg via cfe-dev
> <[hidden email]> wrote:
>>
>> On Tue, Aug 18, 2015 at 11:00 AM, Richard via cfe-dev
>> <[hidden email]> wrote:
>> >
>> > In article
>> > <CAOweq9+cUTyTKJd-+ex5wnfW4q+jZ8hHjfaztxzOSz879C=[hidden email]>,
>> >     Alexander Kornienko via cfe-dev <[hidden email]> writes:
>> >
>> >> OK, clang-tidy summary of changes from 3.6.2 final:
>> >
>> > Nice!
>> >
>> > Is clang-tidy, clang-modernize, etc., getting included in the built
>> > distributions yet?
>> > <https://llvm.org/bugs/show_bug.cgi?id=22765>
>>
>> I hadn't seen this bug :-(
>>
>> Unfortunately it seems the release script isn't building the code in
>> clang-tools-extra. This is easy to fix, but I'm unsure whether doing
>> so at this point in the release is a good idea.
>
>
> I see you've decided to try including clang-tools-extra tools to the
> release. As it turns out to be the first release containing clang-tidy, it
> may make sense to describe either all existing checks or none of them, and
> additionally add a top-level description of clang-tidy itself (can send you
> tomorrow). WDYT?

They were part of the previous releases too, just not in the pre-built
binaries. As most end-users get clang via their linux distro or
similar, I don't think this really changes much.

We kind of have a high-level doc for these tools:
docs/ClangTools.html. That mentions clang-check, clang-format and
clang-modernize. Maybe we should add some documentation of clang-tidy
there, unless it's already documented somewhere else?

 - Hans
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang-tidy and 3.7 release notes

Joan Lluch via cfe-dev

It's documented in http://clang.llvm.org/extra/clang-tidy.html, but it may make sense to add a reference to the document you mentioned.

In any case, if the previous release contained the tool, the release notes should be fine then.

On 19 Aug 2015 01:10, "Hans Wennborg" <[hidden email]> wrote:
On Tue, Aug 18, 2015 at 4:01 PM, Alexander Kornienko <[hidden email]> wrote:
>
>
> On Tue, Aug 18, 2015 at 8:47 PM, Hans Wennborg via cfe-dev
> <[hidden email]> wrote:
>>
>> On Tue, Aug 18, 2015 at 11:00 AM, Richard via cfe-dev
>> <[hidden email]> wrote:
>> >
>> > In article
>> > <CAOweq9+cUTyTKJd-+ex5wnfW4q+jZ8hHjfaztxzOSz879C=[hidden email]>,
>> >     Alexander Kornienko via cfe-dev <[hidden email]> writes:
>> >
>> >> OK, clang-tidy summary of changes from 3.6.2 final:
>> >
>> > Nice!
>> >
>> > Is clang-tidy, clang-modernize, etc., getting included in the built
>> > distributions yet?
>> > <https://llvm.org/bugs/show_bug.cgi?id=22765>
>>
>> I hadn't seen this bug :-(
>>
>> Unfortunately it seems the release script isn't building the code in
>> clang-tools-extra. This is easy to fix, but I'm unsure whether doing
>> so at this point in the release is a good idea.
>
>
> I see you've decided to try including clang-tools-extra tools to the
> release. As it turns out to be the first release containing clang-tidy, it
> may make sense to describe either all existing checks or none of them, and
> additionally add a top-level description of clang-tidy itself (can send you
> tomorrow). WDYT?

They were part of the previous releases too, just not in the pre-built
binaries. As most end-users get clang via their linux distro or
similar, I don't think this really changes much.

We kind of have a high-level doc for these tools:
docs/ClangTools.html. That mentions clang-check, clang-format and
clang-modernize. Maybe we should add some documentation of clang-tidy
there, unless it's already documented somewhere else?

 - Hans

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev