[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68394)

2023-10-06 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle created https://github.com/llvm/llvm-project/pull/68394 …. (#67776)" Now that `scudo` issues have been fixed (#68273). This reverts commit 462bdd5bf0861a27f451f7917802a954e2046bc7. >From 6bf1af81adef93f20f25db4023810fe7be750410 Mon Sep 17 00:00:00 2001 From: Cl

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68394)

2023-10-06 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle closed https://github.com/llvm/llvm-project/pull/68394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-09 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle created https://github.com/llvm/llvm-project/pull/68572 …… (#68394)" The new warnings are now under a separate flag `-Wthread-safety-reference-return`. The plan is: - Start with a period where people can opt into the new warnings with `-Wthread-safety-referenc

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-09 Thread Clement Courbet via cfe-commits
legrosbuffle wrote: @aeubanks FYI https://github.com/llvm/llvm-project/pull/68572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-16 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/68572 >From 11f5286f426d082f7fbcb578c0c6cabcd3660453 Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 9 Oct 2023 10:20:12 +0200 Subject: [PATCH] =?UTF-8?q?Reapply=20"[clang=20analysis][thread-safety]=20?=

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-16 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/68572 >From 2d90dc0547f90c3a217428b2d3b8d2253ae80973 Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 9 Oct 2023 10:20:12 +0200 Subject: [PATCH] =?UTF-8?q?Reapply=20"[clang=20analysis][thread-safety]=20?=

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-17 Thread Clement Courbet via cfe-commits
@@ -1061,18 +1061,20 @@ def Most : DiagGroup<"most", [ ]>; // Thread Safety warnings -def ThreadSafetyAttributes : DiagGroup<"thread-safety-attributes">; -def ThreadSafetyAnalysis : DiagGroup<"thread-safety-analysis">; -def ThreadSafetyPrecise: DiagGroup<"thread-safety-

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-17 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/68572 >From db868042066e8b985d20c1b728729ba7102aaefa Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 9 Oct 2023 10:20:12 +0200 Subject: [PATCH] =?UTF-8?q?Reapply=20"[clang=20analysis][thread-safety]=20?=

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-17 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle edited https://github.com/llvm/llvm-project/pull/68572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc] Add invoke / invoke_result type traits (PR #65750)

2023-09-14 Thread Clement Courbet via cfe-commits
@@ -145,6 +145,110 @@ TEST(LlvmLibcTypeTraitsTest, integral_constant) { EXPECT_EQ((integral_constant::value), 4); } +namespace invoke_detail { + +enum State { INIT = 0, A_APPLY_CALLED, B_APPLY_CALLED }; + +struct A { + State state = INIT; + virtual ~A() {} + virtual void

[clang] [libc] Add invoke / invoke_result type traits (PR #65750)

2023-09-14 Thread Clement Courbet via cfe-commits
@@ -145,6 +145,110 @@ TEST(LlvmLibcTypeTraitsTest, integral_constant) { EXPECT_EQ((integral_constant::value), 4); } +namespace invoke_detail { + +enum State { INIT = 0, A_APPLY_CALLED, B_APPLY_CALLED }; + +struct A { + State state = INIT; + virtual ~A() {} + virtual void

[clang-tools-extra] [libc] Add invoke / invoke_result type traits (PR #65750)

2023-09-14 Thread Clement Courbet via cfe-commits
@@ -145,6 +145,110 @@ TEST(LlvmLibcTypeTraitsTest, integral_constant) { EXPECT_EQ((integral_constant::value), 4); } +namespace invoke_detail { + +enum State { INIT = 0, A_APPLY_CALLED, B_APPLY_CALLED }; + +struct A { + State state = INIT; + virtual ~A() {} + virtual void

[clang] [libc] Add invoke / invoke_result type traits (PR #65750)

2023-09-14 Thread Clement Courbet via cfe-commits
@@ -145,6 +145,110 @@ TEST(LlvmLibcTypeTraitsTest, integral_constant) { EXPECT_EQ((integral_constant::value), 4); } +namespace invoke_detail { + +enum State { INIT = 0, A_APPLY_CALLED, B_APPLY_CALLED }; + +struct A { + State state = INIT; + virtual ~A() {} + virtual void

[clang] [libc] Add invoke / invoke_result type traits (PR #65750)

2023-09-14 Thread Clement Courbet via cfe-commits
@@ -145,6 +145,110 @@ TEST(LlvmLibcTypeTraitsTest, integral_constant) { EXPECT_EQ((integral_constant::value), 4); } +namespace invoke_detail { + +enum State { INIT = 0, A_APPLY_CALLED, B_APPLY_CALLED }; + +struct A { + State state = INIT; + virtual ~A() {} + virtual void

[clang-tools-extra] [libc] Add invoke / invoke_result type traits (PR #65750)

2023-09-14 Thread Clement Courbet via cfe-commits
@@ -145,6 +145,110 @@ TEST(LlvmLibcTypeTraitsTest, integral_constant) { EXPECT_EQ((integral_constant::value), 4); } +namespace invoke_detail { + +enum State { INIT = 0, A_APPLY_CALLED, B_APPLY_CALLED }; + +struct A { + State state = INIT; + virtual ~A() {} + virtual void

[clang] [libc] Add invoke / invoke_result type traits (PR #65750)

2023-09-15 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle approved this pull request. https://github.com/llvm/llvm-project/pull/65750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-transformer] Allow stencils to read from system headers. (PR #66480)

2023-09-15 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle created https://github.com/llvm/llvm-project/pull/66480 We were previously checking that stencil input ranges were writable. It suffices for them to be readable. >From d9f8e39bb042165b53ae3c070f96a5bfe994f9fd Mon Sep 17 00:00:00 2001 From: Clement Courbet Date:

[clang] [clang-transformer] Allow stencils to read from system headers. (PR #66480)

2023-09-15 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/66480 >From 312eeef4c301e1049f50436fa3aa8d070b5cb4e9 Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Fri, 15 Sep 2023 10:42:16 +0200 Subject: [PATCH] [clang-transformer] Allow stencils to read from system he

[clang] [clang-transformer] Allow stencils to read from system headers. (PR #66480)

2023-09-15 Thread Clement Courbet via cfe-commits
@@ -91,6 +91,10 @@ StringRef getExtendedText(const T &Node, tok::TokenKind Next, llvm::Error validateEditRange(const CharSourceRange &Range, const SourceManager &SM); +/// Determines whether \p Range is one that can be read from. +llvm::Error vali

[clang] [clang-transformer] Allow stencils to read from system headers. (PR #66480)

2023-09-15 Thread Clement Courbet via cfe-commits
@@ -230,7 +230,7 @@ class SelectorStencil : public StencilInterface { // message. If it's valid, then something else is the cause and we just // return the generic failure message. if (auto Err = - tooling::validateEditRange(*RawRange, *Match.Sour

[clang] [clang-transformer] Allow stencils to read from system headers. (PR #66480)

2023-09-15 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/66480 >From b23472e55093ea1d48d11386cc4ced43f913c170 Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Fri, 15 Sep 2023 10:42:16 +0200 Subject: [PATCH] [clang-transformer] Allow stencils to read from system he

[clang] [clang-transformer] Allow stencils to read from system headers. (PR #66480)

2023-09-18 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle closed https://github.com/llvm/llvm-project/pull/66480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 95fe549 - [clang-tidy] new performance-no-automatic-move check.

2019-11-21 Thread Clement Courbet via cfe-commits
Author: Clement Courbet Date: 2019-11-22T08:47:55+01:00 New Revision: 95fe54931fddf9740b3247219e30504da447 URL: https://github.com/llvm/llvm-project/commit/95fe54931fddf9740b3247219e30504da447 DIFF: https://github.com/llvm/llvm-project/commit/95fe54931fddf9740b3247219e30504da447.dif

r328086 - [ASTMatchers] Regenerate doc.

2018-03-21 Thread Clement Courbet via cfe-commits
Author: courbet Date: Wed Mar 21 03:48:00 2018 New Revision: 328086 URL: http://llvm.org/viewvc/llvm-project?rev=328086&view=rev Log: [ASTMatchers] Regenerate doc. Modified: cfe/trunk/docs/LibASTMatchersReference.html Modified: cfe/trunk/docs/LibASTMatchersReference.html URL: http://llvm.or

r328087 - [ASTMatchers] Remove extra qualifier for consistency (LibASTMatchersReference.html)

2018-03-21 Thread Clement Courbet via cfe-commits
Author: courbet Date: Wed Mar 21 03:54:29 2018 New Revision: 328087 URL: http://llvm.org/viewvc/llvm-project?rev=328087&view=rev Log: [ASTMatchers] Remove extra qualifier for consistency (LibASTMatchersReference.html) + Regenerate doc. Modified: cfe/trunk/docs/LibASTMatchersReference.html

[clang-tools-extra] 1012677 - [clang-tidy]bugprone-fold-init-type

2023-04-07 Thread Clement Courbet via cfe-commits
Author: Clement Courbet Date: 2023-04-07T14:17:03+02:00 New Revision: 1012677284b87091f76542c3c79da641101578ae URL: https://github.com/llvm/llvm-project/commit/1012677284b87091f76542c3c79da641101578ae DIFF: https://github.com/llvm/llvm-project/commit/1012677284b87091f76542c3c79da641101578ae.dif

[clang-tools-extra] d880d4e - [doc][clang-tidy] Sort release notes by check name.

2023-04-07 Thread Clement Courbet via cfe-commits
Author: Clement Courbet Date: 2023-04-07T16:11:37+02:00 New Revision: d880d4e7c228e27bd8040e7e2616cfd8c02678bf URL: https://github.com/llvm/llvm-project/commit/d880d4e7c228e27bd8040e7e2616cfd8c02678bf DIFF: https://github.com/llvm/llvm-project/commit/d880d4e7c228e27bd8040e7e2616cfd8c02678bf.dif

[clang-tools-extra] 9182c67 - [clang-tidy]performance-no-automatic-move: fix false negative on `const T&&` ctors.

2023-05-24 Thread Clement Courbet via cfe-commits
Author: Clement Courbet Date: 2023-05-24T15:05:39+02:00 New Revision: 9182c679dde7cb6480e66b9231a53d43ad03908b URL: https://github.com/llvm/llvm-project/commit/9182c679dde7cb6480e66b9231a53d43ad03908b DIFF: https://github.com/llvm/llvm-project/commit/9182c679dde7cb6480e66b9231a53d43ad03908b.dif

[clang-tools-extra] 62dc3ba - [clang-tidy]Fix rG9182c679dde7cb6480e66b9231a53d43ad03908b

2023-05-24 Thread Clement Courbet via cfe-commits
Author: Clement Courbet Date: 2023-05-24T15:19:00+02:00 New Revision: 62dc3ba8442fa3f7003d46d2838307452a0391f4 URL: https://github.com/llvm/llvm-project/commit/62dc3ba8442fa3f7003d46d2838307452a0391f4 DIFF: https://github.com/llvm/llvm-project/commit/62dc3ba8442fa3f7003d46d2838307452a0391f4.dif

[clang-tools-extra] 32ffc55 - [clang-tidy] Really fix rG9182c679dde7

2023-05-24 Thread Clement Courbet via cfe-commits
Author: Clement Courbet Date: 2023-05-24T15:21:50+02:00 New Revision: 32ffc1feda4cf3eeec5740af5c5f386e584c URL: https://github.com/llvm/llvm-project/commit/32ffc1feda4cf3eeec5740af5c5f386e584c DIFF: https://github.com/llvm/llvm-project/commit/32ffc1feda4cf3eeec5740af5c5f386e584c.dif

[clang-tools-extra] r290340 - [clang-tidy] cppcoreguidelines-slicing: display discarded state size in bytes

2016-12-22 Thread Clement Courbet via cfe-commits
Author: courbet Date: Thu Dec 22 08:12:31 2016 New Revision: 290340 URL: http://llvm.org/viewvc/llvm-project?rev=290340&view=rev Log: [clang-tidy] cppcoreguidelines-slicing: display discarded state size in bytes https://reviews.llvm.org/D27212 Modified: clang-tools-extra/trunk/clang-tidy/cpp

Re: [PATCH] D23641: [ASTMatchers] Fix documentation of is(Un)SignedInteger()

2016-08-23 Thread Clement Courbet via cfe-commits
courbet added a comment. Thanks. https://reviews.llvm.org/D23641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r307663 - [ASTMatchers][NFC] integerLiteral(): Mention negative integers in

2017-07-11 Thread Clement Courbet via cfe-commits
Author: courbet Date: Tue Jul 11 08:45:22 2017 New Revision: 307663 URL: http://llvm.org/viewvc/llvm-project?rev=307663&view=rev Log: [ASTMatchers][NFC] integerLiteral(): Mention negative integers in documentation. Trying to match integerLiteral(-1) will silently fail, because an numeric literal

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-19 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 64641. courbet marked an inline comment as done. courbet added a comment. cosmetics https://reviews.llvm.org/D21992 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguide

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-19 Thread Clement Courbet via cfe-commits
courbet added a comment. Thanks for the review. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:86 @@ +85,3 @@ + "slicing object from type %0 to %1 discards override %2") + << &DerivedDecl << &BaseDecl << Method; +} alexfh wrote:

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-20 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 64642. courbet added a comment. rebase https://reviews.llvm.org/D21992 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidelines/SlicingCheck.cpp clang-tidy/cppcoregu

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-20 Thread Clement Courbet via cfe-commits
courbet marked an inline comment as done. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.h:19 @@ +18,3 @@ + +/// Flags slicing of member variables or vtable. See: +/// - Prazek wrote: > some short description what does this check do? There is already a mo

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-22 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 65028. courbet marked an inline comment as done. https://reviews.llvm.org/D21992 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidelines/SlicingCheck.cpp clang-tidy/c

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-22 Thread Clement Courbet via cfe-commits
courbet added a comment. I can submit, thanks. https://reviews.llvm.org/D21992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r276408 - [clang-tidy] new cppcoreguidelines-slicing

2016-07-22 Thread Clement Courbet via cfe-commits
Author: courbet Date: Fri Jul 22 07:42:19 2016 New Revision: 276408 URL: http://llvm.org/viewvc/llvm-project?rev=276408&view=rev Log: [clang-tidy] new cppcoreguidelines-slicing Flags slicing of member variables or vtable. See: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidel

[clang-tools-extra] r276413 - Revert "[clang-tidy] new cppcoreguidelines-slicing"

2016-07-22 Thread Clement Courbet via cfe-commits
Author: courbet Date: Fri Jul 22 08:33:51 2016 New Revision: 276413 URL: http://llvm.org/viewvc/llvm-project?rev=276413&view=rev Log: Revert "[clang-tidy] new cppcoreguidelines-slicing" Tests fail on clang-x64-ninja-win7 due to too narrow expectation. Removed: clang-tools-extra/trunk/clang-t

[clang-tools-extra] r276415 - Revert "Revert "[clang-tidy] new cppcoreguidelines-slicing""

2016-07-22 Thread Clement Courbet via cfe-commits
Author: courbet Date: Fri Jul 22 08:45:00 2016 New Revision: 276415 URL: http://llvm.org/viewvc/llvm-project?rev=276415&view=rev Log: Revert "Revert "[clang-tidy] new cppcoreguidelines-slicing"" Second try for r276408 Added: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/SlicingCheck.c

Re: [PATCH] D19534: [clang-tidy] new google-default-arguments check

2016-05-03 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 56000. courbet marked 4 inline comments as done. courbet added a comment. Cosmetics + change error message. http://reviews.llvm.org/D19534 Files: clang-tidy/google/CMakeLists.txt clang-tidy/google/DefaultArgumentsCheck.cpp clang-tidy/google/DefaultArg

Re: [PATCH] D19534: [clang-tidy] new google-default-arguments check

2016-05-03 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: clang-tidy/google/GoogleTidyModule.cpp:40 @@ -38,1 +39,3 @@ void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { +CheckFactories.registerCheck( +"google-default-arguments"); hokein wro

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-03 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 56006. courbet marked an inline comment as done. courbet added a comment. implement overridden_methods_begin()/end() in terms of overridden_methods(). http://reviews.llvm.org/D19324 Files: docs/LibASTMatchersReference.html include/clang/AST/ASTContext.h

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-03 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: include/clang/AST/ASTContext.h:824 @@ -823,1 +823,3 @@ unsigned overridden_methods_size(const CXXMethodDecl *Method) const; + const ArrayRef overridden_methods( + const CXXMethodDecl *Method) const; aaron.ballman

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-03 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: include/clang/AST/ASTContext.h:824 @@ -823,1 +823,3 @@ unsigned overridden_methods_size(const CXXMethodDecl *Method) const; + const ArrayRef overridden_methods( + const CXXMethodDecl *Method) const; aaron.ballman

Re: [PATCH] D19534: [clang-tidy] new google-default-arguments check

2016-05-08 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 56529. courbet marked an inline comment as done. http://reviews.llvm.org/D19534 Files: clang-tidy/google/CMakeLists.txt clang-tidy/google/DefaultArgumentsCheck.cpp clang-tidy/google/DefaultArgumentsCheck.h clang-tidy/google/GoogleTidyModule.cpp docs

Re: [PATCH] D19534: [clang-tidy] new google-default-arguments check

2016-05-08 Thread Clement Courbet via cfe-commits
courbet added a comment. Thanks. I don't have write access, could you please submit this for me ? http://reviews.llvm.org/D19534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-17 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 57462. courbet added a comment. Use iterator_range instead of ArrayRef for overridden_methods http://reviews.llvm.org/D19324 Files: docs/LibASTMatchersReference.html include/clang/AST/ASTContext.h include/clang/AST/DeclCXX.h include/clang/ASTMatcher

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-17 Thread Clement Courbet via cfe-commits
courbet added a comment. Thanks. Could please you submit this for me ? Comment at: include/clang/ASTMatchers/ASTMatchers.h:3724 @@ +3723,3 @@ + bool Matched = false; + for (const auto *Overridden : Node.overridden_methods()) { +BoundNodesTreeBuilder OverriddenBuilder(*Buil

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-17 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 57473. courbet added a comment. cometics http://reviews.llvm.org/D19324 Files: docs/LibASTMatchersReference.html include/clang/AST/ASTContext.h include/clang/AST/DeclCXX.h include/clang/ASTMatchers/ASTMatchers.h lib/AST/ASTContext.cpp lib/AST/De

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-19 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 57756. courbet added a comment. Rebase on HEAD. http://reviews.llvm.org/D19324 Files: docs/LibASTMatchersReference.html include/clang/AST/ASTContext.h include/clang/AST/DeclCXX.h include/clang/ASTMatchers/ASTMatchers.h lib/AST/ASTContext.cpp lib

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-19 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 57757. courbet added a comment. clang-format diff http://reviews.llvm.org/D19324 Files: docs/LibASTMatchersReference.html include/clang/AST/ASTContext.h include/clang/AST/DeclCXX.h include/clang/ASTMatchers/ASTMatchers.h lib/AST/ASTContext.cpp l

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-19 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:3776 @@ +3775,3 @@ + bool Matched = false; + for (const auto *Overridden : Node.overridden_methods()) { +BoundNodesTreeBuilder OverriddenBuilder(*Builder); Thanks for the poin

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-05-20 Thread Clement Courbet via cfe-commits
courbet marked 10 inline comments as done. courbet added a comment. http://reviews.llvm.org/D19324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-03-31 Thread Clement Courbet via cfe-commits
courbet created this revision. courbet added a reviewer: alexfh. courbet added a subscriber: cfe-commits. This check flags initializers of globals that access extern objects, and therefore can lead to order-of-initialization problems (this recommandation is part of CPP core guidelines). Note tha

Re: [PATCH] D18442: A clang-tidy check for std:accumulate.

2016-03-31 Thread Clement Courbet via cfe-commits
courbet added a comment. ping ? http://reviews.llvm.org/D18442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52353. courbet added a comment. Updated release notes. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidelines/InterfacesGlobalInitChec

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet added a comment. In http://reviews.llvm.org/D18649#388337, @Eugene.Zelenko wrote: > Please mention new check in docs/ReleaseNotes.rst. That should be in a different commit, right ? Release notes are in a different repo (forgive my ignorance, this is my first patch). http://reviews.ll

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet removed a subscriber: etienneb. courbet updated this revision to Diff 52366. courbet marked 2 inline comments as done. courbet added a comment. Style fixes. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelin

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet added a subscriber: etienneb. courbet added a comment. Looks like there's a race condition in phabricator. Comment at: test/clang-tidy/cppcoreguidelines-interfaces-global-init.cpp:37 @@ +36,3 @@ +static int FromClassBadInit = takesInt(A::ClassScope); +// CHECK-MESSAGES:

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52370. courbet marked 3 inline comments as done. courbet added a comment. Constness + typos. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppc

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-04 Thread Clement Courbet via cfe-commits
courbet added a comment. In http://reviews.llvm.org/D18649#389363, @alexfh wrote: > Thank you for working on the new clang-tidy check! > > We usually recommend authors to run their checks on a large code base to > ensure it doesn't crash and doesn't generate obvious false positives. It > would

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-04 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52541. courbet marked 2 inline comments as done. courbet added a comment. cosmetics + more documentation http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp cla

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-04 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-interfaces-global-init.rst:7 @@ +6,3 @@ +This check flags initializers of globals that access extern objects, +and therefore can lead to order-of-initialization problems. + alexfh

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-04 Thread Clement Courbet via cfe-commits
courbet added a comment. In http://reviews.llvm.org/D18649#391001, @alexfh wrote: > In http://reviews.llvm.org/D18649#390862, @courbet wrote: > > > In http://reviews.llvm.org/D18649#389363, @alexfh wrote: > > > > > Thank you for working on the new clang-tidy check! > > > > > > We usually recommen

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-05 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52684. courbet added a comment. Fix 5 of the 8 false positives. Add tests. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidelines/Inte

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-05 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52688. courbet added a comment. Update naming to be constistent with the standard: use "non-local" instead of "global" (or "static" in my case, as I started from classes and the name stuck). http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguideli

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-05 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52696. courbet marked an inline comment as done. courbet added a comment. cosmetics http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidel

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-08 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52999. courbet added a comment. Add unit test for multiple declaration then definition. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoregu

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-08 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: test/clang-tidy/cppcoreguidelines-interfaces-global-init.cpp:7 @@ +6,3 @@ + +extern int ExternGlobal; +static int GlobalScopeBadInit1 = ExternGlobal; alexfh wrote: > What happens if you add: > > extern int ExternGlobal

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-08 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 53001. courbet added a comment. Rebase on HEAD for submission. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidelines/InterfacesGlobal

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-08 Thread Clement Courbet via cfe-commits
courbet added a comment. That'd be great. Thanks all for the review. http://reviews.llvm.org/D18649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D19113: [ASTMatchers] Upgrading typedef matching to c++11

2016-04-14 Thread Clement Courbet via cfe-commits
courbet created this revision. courbet added a subscriber: cfe-commits. Herald added a subscriber: klimek. - hasType() should be able to match the types of TypedefAliasDecl in addition to TypedefDecl, so made it work on TypedefNameDecl. - new typedefNameDecl() matcher, which should be mostly used

Re: [PATCH] D19113: [ASTMatchers] Upgrading typedef matching to c++11

2016-04-14 Thread Clement Courbet via cfe-commits
courbet updated the summary for this revision. courbet updated this revision to Diff 53724. courbet marked an inline comment as done. courbet added a comment. Added typeAliasDecl. More tests. http://reviews.llvm.org/D19113 Files: include/clang/ASTMatchers/ASTMatchers.h include/clang/ASTMatc

Re: [PATCH] D19113: [ASTMatchers] Upgrading typedef matching to c++11

2016-04-14 Thread Clement Courbet via cfe-commits
courbet added a comment. In http://reviews.llvm.org/D19113#401095, @aaron.ballman wrote: > If we're going to add this (which I think is a good idea), perhaps we should > also add `typeAliasDecl()` at the same time? Makes sense, done. http://reviews.llvm.org/D19113

[PATCH] D19117: [clang-tidy] Update RedundantVoidArgCheck to check for type aliases in addition to typedefs

2016-04-14 Thread Clement Courbet via cfe-commits
courbet created this revision. courbet added a subscriber: cfe-commits. RedundantVoidArgCheck will now warn on: using f_t = int (*(void))(void); too. (Depends on http://reviews.llvm.org/D19113) http://reviews.llvm.org/D19117 Files: clang-tidy/modernize/RedundantVoidArgCheck.cpp clang-tidy

Re: [PATCH] D19113: [ASTMatchers] Upgrading typedef matching to c++11

2016-04-14 Thread Clement Courbet via cfe-commits
courbet added a comment. Example of where this is useful as a drop-in replacement for typedefDecl(): http://reviews.llvm.org/D19117 http://reviews.llvm.org/D19113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

Re: [PATCH] D19113: [ASTMatchers] Upgrading typedef matching to c++11

2016-04-14 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 53732. courbet marked 2 inline comments as done. courbet added a comment. Regenerate doc, cosmetics. http://reviews.llvm.org/D19113 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h include/clang/ASTMatchers/ASTMatchersI

Re: [PATCH] D19113: [ASTMatchers] Upgrading typedef matching to c++11

2016-04-14 Thread Clement Courbet via cfe-commits
courbet added a comment. Thanks for the review ! I don't have write access, could you please submit this for me ? http://reviews.llvm.org/D19113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

Re: [PATCH] D19117: [clang-tidy] Update RedundantVoidArgCheck to check for type aliases in addition to typedefs

2016-04-14 Thread Clement Courbet via cfe-commits
courbet marked an inline comment as done. Comment at: clang-tidy/modernize/RedundantVoidArgCheck.cpp:109-110 @@ -107,4 +108,4 @@ SourceLocation Start = Function->getLocStart(); -SourceLocation End = Body ? Body->getLocStart().getLocWithOffset(-1) : -

Re: [PATCH] D19117: [clang-tidy] Update RedundantVoidArgCheck to check for type aliases in addition to typedefs

2016-04-14 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 53735. courbet added a comment. Fix error message in case of type alias declaration. http://reviews.llvm.org/D19117 Files: clang-tidy/modernize/RedundantVoidArgCheck.cpp clang-tidy/modernize/RedundantVoidArgCheck.h test/clang-tidy/modernize-redundant-

Re: [PATCH] D19117: [clang-tidy] Update RedundantVoidArgCheck to check for type aliases in addition to typedefs

2016-04-14 Thread Clement Courbet via cfe-commits
courbet added a comment. Thanks for the review ! > I can submit the patch on your behalf if you would like. That'd be great, thank you. Comment at: clang-tidy/modernize/RedundantVoidArgCheck.cpp:109-111 @@ -107,5 +108,5 @@ SourceLocation Start = Function->getLocStart();

Re: [PATCH] D18442: A clang-tidy check for std:accumulate.

2016-04-18 Thread Clement Courbet via cfe-commits
courbet updated the summary for this revision. courbet updated this revision to Diff 54045. courbet marked 7 inline comments as done. courbet added a comment. - Use matchers for most of the check logic, - Implement checking for reduce and inner_product, - more tests. http://reviews.llvm.org/D184

Re: [PATCH] D18442: A clang-tidy check for std:accumulate.

2016-04-18 Thread Clement Courbet via cfe-commits
courbet added a comment. Thanks, PTAL. Comment at: clang-tidy/misc/FoldInitTypeCheck.cpp:21 @@ +20,3 @@ +/// Returns the value_type for an InputIterator type. +static QualType getInputIteratorValueType(const Type &IteratorType, + const AS

[PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-04-20 Thread Clement Courbet via cfe-commits
courbet created this revision. courbet added a subscriber: cfe-commits. Herald added a subscriber: klimek. Matches methods overridden by the given method. http://reviews.llvm.org/D19324 Files: include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatcher

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-04-20 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 54462. courbet marked an inline comment as done. courbet added a comment. Fix typo in doc. http://reviews.llvm.org/D19324 Files: include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/ASTMatchersTest.cpp In

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-04-21 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: unittests/ASTMatchers/ASTMatchersTest.cpp:2084 @@ +2083,3 @@ + Code1, ForEachOverriddenInClass("C"), + new VerifyIdIsBoundTo("override", "f", 1))); + EXPECT_TRUE(matchAndVerifyResultTrue( aaron.ballman wrote: >

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-04-21 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:3724 @@ +3723,3 @@ + bool Matched = false; + for (auto It = Node.begin_overridden_methods(); + It != Node.end_overridden_methods(); ++It) { aaron.ballman wrote: > Can you ra

[PATCH] D19362: [ASTMatchers] Statically specify ownership of verifiers in tests. NFC

2016-04-21 Thread Clement Courbet via cfe-commits
courbet created this revision. courbet added a reviewer: aaron.ballman. courbet added a subscriber: cfe-commits. Herald added a subscriber: klimek. Statically specify ownership of verifiers in tests. NFC http://reviews.llvm.org/D19362 Files: unittests/ASTMatchers/ASTMatchersTest.cpp unittest

Re: [PATCH] D19362: [ASTMatchers] Statically specify ownership of verifiers in tests. NFC

2016-04-21 Thread Clement Courbet via cfe-commits
courbet added a comment. Thanks! Would you mind submitting this for me ? http://reviews.llvm.org/D19362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19362: [ASTMatchers] Statically specify ownership of verifiers in tests. NFC

2016-04-21 Thread Clement Courbet via cfe-commits
courbet added a comment. Thanks ! http://reviews.llvm.org/D19362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-04-21 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 54512. courbet marked 4 inline comments as done. courbet added a comment. - add overridden_methods() to CXXMethodDecl and plumbing. - Use range-based for loop for iterating over overridden methods. http://reviews.llvm.org/D19324 Files: include/clang/AST/A

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-04-21 Thread Clement Courbet via cfe-commits
courbet marked an inline comment as done. courbet added a comment. http://reviews.llvm.org/D19324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-04-21 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 54514. courbet added a comment. Regenerate doc. http://reviews.llvm.org/D19324 Files: docs/LibASTMatchersReference.html include/clang/AST/ASTContext.h include/clang/AST/DeclCXX.h include/clang/ASTMatchers/ASTMatchers.h lib/AST/ASTContext.cpp lib

Re: [PATCH] D19324: [ASTMatchers] new forEachOverriden matcher

2016-04-25 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 54830. courbet marked an inline comment as done. courbet added a comment. overridden_methods return ArrayRef instead of TinyPtrVector* http://reviews.llvm.org/D19324 Files: docs/LibASTMatchersReference.html include/clang/AST/ASTContext.h include/clang

Re: [PATCH] D18442: A clang-tidy check for std:accumulate.

2016-04-25 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: clang-tidy/misc/FoldInitTypeCheck.cpp:89 @@ +88,3 @@ + +/// Returns true if ValueType is allowed to fold into InitType, i.e. if: +/// static_cast(ValueType{some_value}) alexfh wrote: > Is "fold" a commonly used term in

Re: [PATCH] D18442: A clang-tidy check for std:accumulate.

2016-04-25 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 54833. courbet marked 3 inline comments as done. courbet added a comment. Refactoring matchers & cosmetics. http://reviews.llvm.org/D18442 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/FoldInitTypeCheck.cpp clang-tidy/misc/FoldInitTypeCheck.h

Re: [PATCH] D18442: A clang-tidy check for std:accumulate.

2016-04-26 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 54969. courbet marked 2 inline comments as done. courbet added a comment. Fix doc formatting and add more doc. http://reviews.llvm.org/D18442 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/FoldInitTypeCheck.cpp clang-tidy/misc/FoldInitTypeCheck

<    1   2   3   >