[clang] 9dcc82f - Thread safety analysis: Consider global variables in scope

2020-09-05 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-09-05T17:26:12+02:00 New Revision: 9dcc82f34ea9b623d82d2577b93aaf67d36dabd2 URL: https://github.com/llvm/llvm-project/commit/9dcc82f34ea9b623d82d2577b93aaf67d36dabd2 DIFF: https://github.com/llvm/llvm-project/commit/9dcc82f34ea9b623d82d2577b93aaf67d36dabd2.diff

[clang] d3a779f - Restore size of TemplateParameterList after D44352

2020-09-05 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-09-05T18:01:33+02:00 New Revision: d3a779fe21500457e95c8c4e963638b93e3bcc71 URL: https://github.com/llvm/llvm-project/commit/d3a779fe21500457e95c8c4e963638b93e3bcc71 DIFF: https://github.com/llvm/llvm-project/commit/d3a779fe21500457e95c8c4e963638b93e3bcc71.diff

[clang-tools-extra] da6b3aa - Attempt to fix Sphinx build failure, NFC

2020-09-05 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-09-05T18:25:27+02:00 New Revision: da6b3aa4c6bb29a150628ad489274466c6b8ace0 URL: https://github.com/llvm/llvm-project/commit/da6b3aa4c6bb29a150628ad489274466c6b8ace0 DIFF: https://github.com/llvm/llvm-project/commit/da6b3aa4c6bb29a150628ad489274466c6b8ace0.diff

[clang] bbb3baf - Thread safety analysis: Improve documentation for scoped capabilities

2020-09-06 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-09-06T20:37:42+02:00 New Revision: bbb3baf6205c54231257f64fd18661a13a5c97ee URL: https://github.com/llvm/llvm-project/commit/bbb3baf6205c54231257f64fd18661a13a5c97ee DIFF: https://github.com/llvm/llvm-project/commit/bbb3baf6205c54231257f64fd18661a13a5c97ee.diff

[clang] cc6713a - Thread safety analysis: Test and document release_generic_capability

2020-09-06 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-09-06T20:37:41+02:00 New Revision: cc6713a2c35edf17cfb567284cc76b374308e5e4 URL: https://github.com/llvm/llvm-project/commit/cc6713a2c35edf17cfb567284cc76b374308e5e4 DIFF: https://github.com/llvm/llvm-project/commit/cc6713a2c35edf17cfb567284cc76b374308e5e4.diff

[clang] 6f84779 - [Sema] Improve notes for value category mismatch in overloading

2020-11-15 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-11-15T18:05:11+01:00 New Revision: 6f84779674a9764c6adee29b9a48ed3b3f0d5132 URL: https://github.com/llvm/llvm-project/commit/6f84779674a9764c6adee29b9a48ed3b3f0d5132 DIFF: https://github.com/llvm/llvm-project/commit/6f84779674a9764c6adee29b9a48ed3b3f0d5132.diff

[libclc] 1c1a810 - libclc: Use find_package to find Python 3 and require it

2020-10-01 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-10-01T22:31:33+02:00 New Revision: 1c1a8105580784c96212db1afc097a844740bc69 URL: https://github.com/llvm/llvm-project/commit/1c1a8105580784c96212db1afc097a844740bc69 DIFF: https://github.com/llvm/llvm-project/commit/1c1a8105580784c96212db1afc097a844740bc69.diff

[clang] 825f80e - [Sema] Introduce function reference conversion, NFC

2020-11-22 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-11-22T20:51:57+01:00 New Revision: 825f80e111f2815a009084f65267be3b5bf0897a URL: https://github.com/llvm/llvm-project/commit/825f80e111f2815a009084f65267be3b5bf0897a DIFF: https://github.com/llvm/llvm-project/commit/825f80e111f2815a009084f65267be3b5bf0897a.diff

[clang] 5250a03 - Thread safety analysis: Consider global variables in scope

2020-10-25 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-10-25T19:32:26+01:00 New Revision: 5250a03a9959c2701a8338fe1a1ffa8bd93d6173 URL: https://github.com/llvm/llvm-project/commit/5250a03a9959c2701a8338fe1a1ffa8bd93d6173 DIFF: https://github.com/llvm/llvm-project/commit/5250a03a9959c2701a8338fe1a1ffa8bd93d6173.diff

[clang] b296c64 - Thread safety analysis: Nullability improvements in TIL, NFCI

2020-10-25 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-10-25T19:37:16+01:00 New Revision: b296c64e64a0bc600538c8bc67d4ccc2564e3c72 URL: https://github.com/llvm/llvm-project/commit/b296c64e64a0bc600538c8bc67d4ccc2564e3c72 DIFF: https://github.com/llvm/llvm-project/commit/b296c64e64a0bc600538c8bc67d4ccc2564e3c72.diff

[clang] ebfc427 - [Sema] Let getters assert that trailing return type exists, NFCI

2020-10-28 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-10-28T23:32:57+01:00 New Revision: ebfc427bbe08f0c36af9721d5a4e6d3ffe2e4bf5 URL: https://github.com/llvm/llvm-project/commit/ebfc427bbe08f0c36af9721d5a4e6d3ffe2e4bf5 DIFF: https://github.com/llvm/llvm-project/commit/ebfc427bbe08f0c36af9721d5a4e6d3ffe2e4bf5.diff

[clang] 5dbccc6 - Better source location for -Wignored-qualifiers on trailing return types

2020-10-28 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-10-28T23:32:57+01:00 New Revision: 5dbccc6c89c0f6c6dc6277cc304057f6d50b298d URL: https://github.com/llvm/llvm-project/commit/5dbccc6c89c0f6c6dc6277cc304057f6d50b298d DIFF: https://github.com/llvm/llvm-project/commit/5dbccc6c89c0f6c6dc6277cc304057f6d50b298d.diff

[clang] bbed8cf - Thread safety analysis: Consider static class members as inaccessible

2020-10-29 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-10-30T00:35:14+01:00 New Revision: bbed8cfe80cd27d3a47d877c7608d9be4e487d97 URL: https://github.com/llvm/llvm-project/commit/bbed8cfe80cd27d3a47d877c7608d9be4e487d97 DIFF: https://github.com/llvm/llvm-project/commit/bbed8cfe80cd27d3a47d877c7608d9be4e487d97.diff

[clang] a5c2ec9 - [AST] Store regular ValueDecl* in BindingDecl (NFC)

2021-05-20 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-05-20T16:28:58+02:00 New Revision: a5c2ec96e5f9f14b31b705e40bcb267257612316 URL: https://github.com/llvm/llvm-project/commit/a5c2ec96e5f9f14b31b705e40bcb267257612316 DIFF: https://github.com/llvm/llvm-project/commit/a5c2ec96e5f9f14b31b705e40bcb267257612316.diff

[clang] 3d64677 - Thread safety analysis: Factor out function for merging locks (NFC)

2021-05-27 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-05-27T17:44:48+02:00 New Revision: 3d64677c28072867ea6025a22805977386b767f8 URL: https://github.com/llvm/llvm-project/commit/3d64677c28072867ea6025a22805977386b767f8 DIFF: https://github.com/llvm/llvm-project/commit/3d64677c28072867ea6025a22805977386b767f8.diff

[clang] cf0b337 - Thread safety analysis: Allow exlusive/shared joins for managed and asserted capabilities

2021-05-27 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-05-27T17:46:04+02:00 New Revision: cf0b337c1b1f064c81fe40124ddba178572778d6 URL: https://github.com/llvm/llvm-project/commit/cf0b337c1b1f064c81fe40124ddba178572778d6 DIFF: https://github.com/llvm/llvm-project/commit/cf0b337c1b1f064c81fe40124ddba178572778d6.diff

[clang] 9b889f8 - Thread safety analysis: Warn when demoting locks on back edges

2021-09-18 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-09-18T13:46:55+02:00 New Revision: 9b889f826ff587e9758c80823419512d502e457d URL: https://github.com/llvm/llvm-project/commit/9b889f826ff587e9758c80823419512d502e457d DIFF: https://github.com/llvm/llvm-project/commit/9b889f826ff587e9758c80823419512d502e457d.diff

[clang] 6de19ea - Thread safety analysis: Drop special block handling

2021-09-20 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-09-20T15:20:15+02:00 New Revision: 6de19ea4b6264e64cea145e00ab66fe1530fc0a0 URL: https://github.com/llvm/llvm-project/commit/6de19ea4b6264e64cea145e00ab66fe1530fc0a0 DIFF: https://github.com/llvm/llvm-project/commit/6de19ea4b6264e64cea145e00ab66fe1530fc0a0.diff

[clang] f664e2e - Thread safety analysis: Always warn when dropping locks on back edges

2021-06-29 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-06-29T23:56:52+02:00 New Revision: f664e2ec371f61b69e11147d7f9e045083335917 URL: https://github.com/llvm/llvm-project/commit/f664e2ec371f61b69e11147d7f9e045083335917 DIFF: https://github.com/llvm/llvm-project/commit/f664e2ec371f61b69e11147d7f9e045083335917.diff

[clang] e0b9077 - Thread safety analysis: Rename parameters of ThreadSafetyAnalyzer::intersectAndWarn (NFC)

2021-06-29 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-06-29T23:56:52+02:00 New Revision: e0b90771c318625e51c34c67db3f3dfbbb686df8 URL: https://github.com/llvm/llvm-project/commit/e0b90771c318625e51c34c67db3f3dfbbb686df8 DIFF: https://github.com/llvm/llvm-project/commit/e0b90771c318625e51c34c67db3f3dfbbb686df8.diff

[clang] 196554d - Comment parsing: Complete list of Doxygen commands

2021-11-09 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-11-09T18:35:26+01:00 New Revision: 196554d42d329e45363afe2293d1fc19de75673d URL: https://github.com/llvm/llvm-project/commit/196554d42d329e45363afe2293d1fc19de75673d DIFF: https://github.com/llvm/llvm-project/commit/196554d42d329e45363afe2293d1fc19de75673d.diff

[clang] 3506e42 - Comment AST: Factor out function type extraction in DeclInfo::fill (NFC)

2021-11-09 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-11-09T22:30:08+01:00 New Revision: 3506e42ab67eef41a1f27e180e7c552a27bb URL: https://github.com/llvm/llvm-project/commit/3506e42ab67eef41a1f27e180e7c552a27bb DIFF: https://github.com/llvm/llvm-project/commit/3506e42ab67eef41a1f27e180e7c552a27bb.diff

[clang] 4d63824 - Comment AST: Declare function pointer variables as functions

2021-11-09 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-11-09T22:30:08+01:00 New Revision: 4d6382430066465774f6f696ea3f4c402da1d705 URL: https://github.com/llvm/llvm-project/commit/4d6382430066465774f6f696ea3f4c402da1d705 DIFF: https://github.com/llvm/llvm-project/commit/4d6382430066465774f6f696ea3f4c402da1d705.diff

[clang] 63ef0e1 - Comment AST: Add support for variable templates

2021-11-09 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-11-09T22:30:09+01:00 New Revision: 63ef0e17e28827eae53133b3467bdac7d9729318 URL: https://github.com/llvm/llvm-project/commit/63ef0e17e28827eae53133b3467bdac7d9729318 DIFF: https://github.com/llvm/llvm-project/commit/63ef0e17e28827eae53133b3467bdac7d9729318.diff

[clang] 4e7df1e - Comment AST: Find out if function is variadic in DeclInfo::fill

2021-11-12 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-11-12T21:10:56+01:00 New Revision: 4e7df1ef7b679953c1501177539166876c4cbda4 URL: https://github.com/llvm/llvm-project/commit/4e7df1ef7b679953c1501177539166876c4cbda4 DIFF: https://github.com/llvm/llvm-project/commit/4e7df1ef7b679953c1501177539166876c4cbda4.diff

[clang] 3010883 - Comment AST: Recognize function-like objects via return type (NFC)

2021-11-12 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-11-12T21:11:11+01:00 New Revision: 3010883fc296619def051e0a2f97d40fb15960d7 URL: https://github.com/llvm/llvm-project/commit/3010883fc296619def051e0a2f97d40fb15960d7 DIFF: https://github.com/llvm/llvm-project/commit/3010883fc296619def051e0a2f97d40fb15960d7.diff

[clang] 59b1e98 - Comment Sema: Make most of CommentSema private (NFC)

2021-11-12 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-11-12T21:11:52+01:00 New Revision: 59b1e98137e961a61ffaeb609b6790999c461bec URL: https://github.com/llvm/llvm-project/commit/59b1e98137e961a61ffaeb609b6790999c461bec DIFF: https://github.com/llvm/llvm-project/commit/59b1e98137e961a61ffaeb609b6790999c461bec.diff

[clang] d8fa40d - Thread safety analysis: Handle additional cast in scoped capability construction

2022-10-06 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-10-06T22:18:26+02:00 New Revision: d8fa40dfa7adb062c969ce7ea6ce505e10626838 URL: https://github.com/llvm/llvm-project/commit/d8fa40dfa7adb062c969ce7ea6ce505e10626838 DIFF: https://github.com/llvm/llvm-project/commit/d8fa40dfa7adb062c969ce7ea6ce505e10626838.diff

[clang] 0041a69 - Thread safety analysis: Support copy-elided production of scoped capabilities through arbitrary calls

2022-10-06 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-10-06T22:19:09+02:00 New Revision: 0041a69495f828f6732803cfb0f1e3fddd7fbf2a URL: https://github.com/llvm/llvm-project/commit/0041a69495f828f6732803cfb0f1e3fddd7fbf2a DIFF: https://github.com/llvm/llvm-project/commit/0041a69495f828f6732803cfb0f1e3fddd7fbf2a.diff

[clang] 54bfd04 - Thread safety analysis: Support copy-elided production of scoped capabilities through arbitrary calls

2022-10-13 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-10-13T19:36:15+02:00 New Revision: 54bfd04846156dbd5e0a6b88f539c3d4569a455f URL: https://github.com/llvm/llvm-project/commit/54bfd04846156dbd5e0a6b88f539c3d4569a455f DIFF: https://github.com/llvm/llvm-project/commit/54bfd04846156dbd5e0a6b88f539c3d4569a455f.diff

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2023-10-07 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: Yeah, it's a tricky question. On one hand there have been previous issues like #42194 (which this would basically address), and it would definitely improve consistency and prevent beginner's mistakes. On the other hand it seems useful to allow adding attributes e.g. to thir

[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)

2023-10-08 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/67095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)

2023-10-08 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -8141,6 +8141,16 @@ static void handleRequiresCapabilityAttr(Sema &S, Decl *D, if (!AL.checkAtLeastNumArgs(S, 1)) return; + // We allow this on function declaration as well as + // variable declarations of function

[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)

2023-10-08 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -136,6 +136,17 @@ int main(void) { // Cleanup happens automatically -> no warning. } + /// Function pointers + { +int __attribute__((requires_capability(&mu1))) (*function_ptr)(int) = Foo_fun1;

[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)

2023-10-08 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/aaronpuchert commented: > This was much easier than expected actually. Making it a `DeclOrType` attribute is indeed a nice idea, this would allow existing attributes to stay where they are. Is it still inheritable, i.e. does

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

2023-10-17 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert 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] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-17 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert approved this pull request. Assuming that this is otherwise identical to the Phab review. I would suggest to add some release notes (in a separate change). https://github.com/llvm/llvm-project/pull/68572 ___ cfe-commits

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

2023-10-17 Thread Aaron Puchert via cfe-commits
@@ -2278,7 +2303,7 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) { PostOrderCFGView::CFGBlockSet VisitedBlocks(CFGraph); CFGBlockInfo &Initial = BlockInfo[CFGraph->getEntry().getBlockID()]; - CFGBlockInfo &Final = BlockInfo[CFGraph->getExit().getBl

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

2023-10-17 Thread Aaron Puchert via cfe-commits
@@ -1061,11 +1061,13 @@ 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] [clang][TSA] Consider cleanup functions for thread safety analysis (PR #65462)

2023-09-09 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= aaronpuchert wrote: We still have until the end of September to finish the review on Phabricator. I would suggest that we keep the review there until we have to move. Here I can't see the difference to the last version that I reviewed. https://github.com/llvm/llvm-proj

[clang] 93184a8 - Remove unused parameter from CXXRecordDecl::forallBases [NFC]

2020-02-29 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-02-29T14:23:44+01:00 New Revision: 93184a8eda272c65308906836b47cbf209de779e URL: https://github.com/llvm/llvm-project/commit/93184a8eda272c65308906836b47cbf209de779e DIFF: https://github.com/llvm/llvm-project/commit/93184a8eda272c65308906836b47cbf209de779e.diff

[clang] ae3159e - Thread safety analysis: Peel away NoOp implicit casts in initializers

2019-10-29 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2019-10-30T00:37:32+01:00 New Revision: ae3159e497934ed1320d20aab8b32e3bf00a8f10 URL: https://github.com/llvm/llvm-project/commit/ae3159e497934ed1320d20aab8b32e3bf00a8f10 DIFF: https://github.com/llvm/llvm-project/commit/ae3159e497934ed1320d20aab8b32e3bf00a8f10.diff

[clang] c96428d - Drop spurious self-include [NFC]

2019-11-03 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2019-11-03T14:29:59+01:00 New Revision: c96428d2184fe2329e625f6a0dc04daa02ee42c9 URL: https://github.com/llvm/llvm-project/commit/c96428d2184fe2329e625f6a0dc04daa02ee42c9 DIFF: https://github.com/llvm/llvm-project/commit/c96428d2184fe2329e625f6a0dc04daa02ee42c9.diff

[clang] 0010ea4 - [Driver] Fix incorrect GNU triplet for PowerPC on SUSE Linux

2019-11-23 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2019-11-23T16:00:53+01:00 New Revision: 0010ea4224c7ff6b5aebeecacf10a7ced7d390b7 URL: https://github.com/llvm/llvm-project/commit/0010ea4224c7ff6b5aebeecacf10a7ced7d390b7 DIFF: https://github.com/llvm/llvm-project/commit/0010ea4224c7ff6b5aebeecacf10a7ced7d390b7.diff

[clang] f23df1b - Comment parsing: Treat \ref as inline command

2020-03-05 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-03-05T19:44:34+01:00 New Revision: f23df1b2a323094e5a6869ef085f100fd065bc0d URL: https://github.com/llvm/llvm-project/commit/f23df1b2a323094e5a6869ef085f100fd065bc0d DIFF: https://github.com/llvm/llvm-project/commit/f23df1b2a323094e5a6869ef085f100fd065bc0d.diff

[clang] 33bb32b - [Sema] Reword -Wrange-loop-analysis warning messages

2020-03-06 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-03-06T14:57:01+01:00 New Revision: 33bb32bbc674a16973c59c9a6dc119387843a0f0 URL: https://github.com/llvm/llvm-project/commit/33bb32bbc674a16973c59c9a6dc119387843a0f0 DIFF: https://github.com/llvm/llvm-project/commit/33bb32bbc674a16973c59c9a6dc119387843a0f0.diff

[clang] 27684ae - Don't warn about missing declarations for partial template specializations

2020-01-31 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-02-01T00:06:03+01:00 New Revision: 27684ae66d5545f211c0ac4393d0ba2bf3b5b47c URL: https://github.com/llvm/llvm-project/commit/27684ae66d5545f211c0ac4393d0ba2bf3b5b47c DIFF: https://github.com/llvm/llvm-project/commit/27684ae66d5545f211c0ac4393d0ba2bf3b5b47c.diff

[clang] a9ab01a - Remove superfluous space from -Wrange-loop-construct message

2020-02-02 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-02-02T16:22:58+01:00 New Revision: a9ab01a330f4c7c316fa87c8446888c73dae5536 URL: https://github.com/llvm/llvm-project/commit/a9ab01a330f4c7c316fa87c8446888c73dae5536 DIFF: https://github.com/llvm/llvm-project/commit/a9ab01a330f4c7c316fa87c8446888c73dae5536.diff

[clang] 2f26bc5 - Warn about zero-parameter K&R definitions in -Wstrict-prototypes

2020-02-14 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-02-14T19:25:02+01:00 New Revision: 2f26bc5542705c390bf17af2fdfc31e056147ea9 URL: https://github.com/llvm/llvm-project/commit/2f26bc5542705c390bf17af2fdfc31e056147ea9 DIFF: https://github.com/llvm/llvm-project/commit/2f26bc5542705c390bf17af2fdfc31e056147ea9.diff

[clang] 7053065 - Fix tests after previous commit

2020-02-14 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-02-14T19:41:01+01:00 New Revision: 705306526b5ca7eed2fa28ebf832873cbb5085ec URL: https://github.com/llvm/llvm-project/commit/705306526b5ca7eed2fa28ebf832873cbb5085ec DIFF: https://github.com/llvm/llvm-project/commit/705306526b5ca7eed2fa28ebf832873cbb5085ec.diff

[clang] Thread safety analysis: provide printSCFG definition. (PR #80277)

2024-02-18 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: It might have been commented out so that it doesn't take up space in the compiled binary. I'd like seeing it compiled, just to make sure it doesn't break. But I'd also like if it doesn't appear in the final binary. Perhaps we can change visibility so that `--gc-sections` o

[clang] Thread safety analysis: provide printSCFG definition. (PR #80277)

2024-02-22 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: This sounds like a good idea! https://github.com/llvm/llvm-project/pull/80277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-06-30 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: Doesn't this fit better in `Sema/SemaDeclAttr.cpp`? That's where we're checking the attributes themselves and whether they make sense on a declaration. This would seem like a good place to check against previous declarations. Though to be fair, I don't know how late the lat

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-30 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: Thanks for looping me in and sorry for the late reply! > However, I'm not certain we implement the analysis in an exception-aware way. If I remember correctly, the CFG is still without exception-handling edges by default, and support for those edges is still rudimentary and

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-30 Thread Aaron Puchert via cfe-commits
@@ -756,7 +771,68 @@ void etf_fun_params(int lvar EXCLUSIVE_TRYLOCK_FUNCTION(1)); // \ // Check argument parsing. -// legal attribute arguments +int global_int = 0; +int* etf_fun_with_global_ptr_success() EXCLUSIVE_TRYLOCK_FUNCTION(&global_int, &mu1); //\ + // expected-err

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-30 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/95290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-30 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: Don't want to give the wrong impression, I like the idea of this change a lot. But I think we need to be clearer about the attribute, the return value, and the relation between them. The attribute needs to be a constant expression for sure, and it's p

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-30 Thread Aaron Puchert via cfe-commits
@@ -608,15 +606,31 @@ static bool checkTryLockFunAttrCommon(Sema &S, Decl *D, const ParsedAttr &AL, if (!AL.checkAtLeastNumArgs(S, 1)) return false; - if (!isIntOrBool(AL.getArgAsExpr(0))) { + // The attribute's first argument defines the success value. + const Expr

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-30 Thread Aaron Puchert via cfe-commits
@@ -1954,6 +1954,125 @@ struct TestTryLock { } // end namespace TrylockTest +// Regression test for trylock attributes with an enumerator success argument. +// Prior versions of the analysis silently failed to evaluate success arguments +// that were neither `CXXBoolLiteralEx

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-30 Thread Aaron Puchert via cfe-commits
@@ -1359,17 +1361,18 @@ void ThreadSafetyAnalyzer::getMutexIDs(CapExprSet &Mtxs, AttrType *Attr, const Expr *Exp, const NamedDecl *D, const CFGBlock *PredBlock,

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-06-30 Thread Aaron Puchert via cfe-commits
@@ -764,12 +764,6 @@ doesn't know that munl.mu == mutex. The SCOPED_CAPABILITY attribute handles aliasing for MutexLocker, but does so only for that particular pattern. -ACQUIRED_BEFORE(...) and ACQUIRED_AFTER(...) are currently unimplemented. --

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-06-30 Thread Aaron Puchert via cfe-commits
@@ -29,6 +30,22 @@ struct LOCKABLE Mutex {}; struct Foo { struct Mutex *mu_; + int a_value GUARDED_BY(mu_); + + struct Bar { +struct Mutex *other_mu ACQUIRED_AFTER(mu_); aaronpuchert wrote: I'm not entirely sure how nested `struct`s work in C, but sh

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-06-30 Thread Aaron Puchert via cfe-commits
@@ -29,6 +30,22 @@ struct LOCKABLE Mutex {}; struct Foo { struct Mutex *mu_; + int a_value GUARDED_BY(mu_); + + struct Bar { +struct Mutex *other_mu ACQUIRED_AFTER(mu_); +struct Mutex *third_mu ACQUIRED_BEFORE(other_mu); + } bar; + + int* a_ptr PT_GUARDED_BY(bar

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-07-03 Thread Aaron Puchert via cfe-commits
@@ -1359,17 +1361,18 @@ void ThreadSafetyAnalyzer::getMutexIDs(CapExprSet &Mtxs, AttrType *Attr, const Expr *Exp, const NamedDecl *D, const CFGBlock *PredBlock,

[clang] Thread Safety Analysis: Differentiate between lock sets at real join points and expected/actual sets at function end (PR #105526)

2024-09-04 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert closed https://github.com/llvm/llvm-project/pull/105526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-09-05 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: That might not be enough. A function might not be used (or even referenced) in the TU that defines it, but only in other TUs. But it would certainly catch a number of issues already. https://github.com/llvm/llvm-project/pull/67520 ___

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-09-05 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > > That might not be enough. A function might not be used (or even referenced) > > in the TU that defines it, but only in other TUs. But it would certainly > > catch a number of issues already. > > Right, though catching that ends up being pretty impossible. The most you

[clang] [clang-tools-extra] thread-safety: Support the new capability-based names for all related attributes. (PR #99919)

2024-09-06 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: You should also adapt the warning message for `warn_thread_attribute_not_on_capability_member` and the test `SemaCXX/warn-thread-safety-parsing.cpp`. https://github.com/llvm/llvm-project/pull/99919 ___ cfe-commits mailing list cfe

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-09 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,230 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// Returns vector of format attributes. There are no two attributes with same +// arguments in r

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-09 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,230 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// Returns vector of format attributes. There are no two attributes with same +// arguments in r

[clang] Thread Safety Analysis: Differentiate between lock sets at real join points and expected/actual sets at function end (PR #105526)

2024-08-30 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert approved this pull request. It could be argued that the issue here is something different, namely that we don't add the scoped lock in the return slot to the expected function exit set. But this is likely not enough: * We don't compare the set of underlying mutex

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-08-30 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: This probably fits better in `Sema/SemaDeclAttr.cpp`. Maybe `checkLockFunAttrCommon` is a good place. Add a test to `clang/test/Sema/attr-capabilities.c{,pp}`. https://github.com/llvm/llvm-project/pull/67520 __

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-08-30 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/67520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-08-30 Thread Aaron Puchert via cfe-commits
@@ -2260,6 +2260,37 @@ static bool neverReturns(const CFGBlock *B) { return false; } +template +static SmallVector collectAttrArgs(const FunctionDecl *FD) { + SmallVector Args; + for (const AttrT *A : FD->specific_attrs()) { +for (const Expr *E : A->args()) + Arg

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-08-30 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > Maybe I misunderstood the code of this PR, but I thought it only checks > definitions. That's my understanding as well. I was just thinking about the usual requirement of putting the attribute on the first declaration (like the standard mandates it for `[[noreturn]]`). U

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-08-30 Thread Aaron Puchert via cfe-commits
@@ -3978,7 +3978,9 @@ def warn_acquired_before : Warning< def warn_acquired_before_after_cycle : Warning< "cycle in acquired_before/after dependencies, starting with '%0'">, InGroup, DefaultIgnore; - +def warn_attribute_mismatch : Warning< + "attribute mismatch between fun

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,251 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c_diagnostics -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -Wmissing-format-attribute -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -x c++ -verify=ex

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,251 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c_diagnostics -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -Wmissing-format-attribute -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -x c++ -verify=ex

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,251 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c_diagnostics -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -Wmissing-format-attribute -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -x c++ -verify=ex

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-02 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,176 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,beforeCxx2b -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++2b -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++23 -Wmissing-format-attribute %s +

[clang] 572fe08 - Thread safety analysis: Simplify intersectAndWarn (NFC)

2021-04-23 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-04-23T23:19:15+02:00 New Revision: 572fe087765626529d63eaaefb2e1c5ba277f756 URL: https://github.com/llvm/llvm-project/commit/572fe087765626529d63eaaefb2e1c5ba277f756 DIFF: https://github.com/llvm/llvm-project/commit/572fe087765626529d63eaaefb2e1c5ba277f756.diff

[clang] 530e074 - Thread safety analysis: Replace flags in FactEntry by SourceKind (NFC)

2021-05-03 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-05-03T14:03:17+02:00 New Revision: 530e074faafe995a560e80815f5af8306670ea7b URL: https://github.com/llvm/llvm-project/commit/530e074faafe995a560e80815f5af8306670ea7b DIFF: https://github.com/llvm/llvm-project/commit/530e074faafe995a560e80815f5af8306670ea7b.diff

[clang] daca6ed - Thread safety analysis: Fix false negative on break

2021-05-03 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-05-03T14:03:17+02:00 New Revision: daca6edb31efae048a420595fae9750aaa91c733 URL: https://github.com/llvm/llvm-project/commit/daca6edb31efae048a420595fae9750aaa91c733 DIFF: https://github.com/llvm/llvm-project/commit/daca6edb31efae048a420595fae9750aaa91c733.diff

[clang] d21e1b7 - Thread safety analysis: Eliminate parameter from intersectAndWarn (NFC)

2021-05-06 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-05-06T23:07:42+02:00 New Revision: d21e1b79ff7d40bca537c30da706e31e48483f21 URL: https://github.com/llvm/llvm-project/commit/d21e1b79ff7d40bca537c30da706e31e48483f21 DIFF: https://github.com/llvm/llvm-project/commit/d21e1b79ff7d40bca537c30da706e31e48483f21.diff

[clang] bd0a970 - Comment parsing: Simplify Lexer::skipLineStartingDecorations (NFC)

2022-01-14 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-01-14T22:45:10+01:00 New Revision: bd0a970f5341f9981a9ad33fdfda99f8ff7348b3 URL: https://github.com/llvm/llvm-project/commit/bd0a970f5341f9981a9ad33fdfda99f8ff7348b3 DIFF: https://github.com/llvm/llvm-project/commit/bd0a970f5341f9981a9ad33fdfda99f8ff7348b3.diff

[clang] 9f0fa65 - Comment parsing: Don't recognize commands in single-line double quotation

2022-01-14 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-01-14T22:46:07+01:00 New Revision: 9f0fa6544012ed8f7b6b3d72fce6535bf4430e40 URL: https://github.com/llvm/llvm-project/commit/9f0fa6544012ed8f7b6b3d72fce6535bf4430e40 DIFF: https://github.com/llvm/llvm-project/commit/9f0fa6544012ed8f7b6b3d72fce6535bf4430e40.diff

[clang] 1cb15b1 - Correct Doxygen syntax for inline code

2021-03-16 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-03-16T15:17:45+01:00 New Revision: 1cb15b10ea370178871769929ff9690f461191fc URL: https://github.com/llvm/llvm-project/commit/1cb15b10ea370178871769929ff9690f461191fc DIFF: https://github.com/llvm/llvm-project/commit/1cb15b10ea370178871769929ff9690f461191fc.diff

[clang] a6a1c30 - Fix false negative in -Wthread-safety-attributes

2021-03-24 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-03-24T17:45:25+01:00 New Revision: a6a1c3051dbd2cc5ccc70272890cf38d11dca9c7 URL: https://github.com/llvm/llvm-project/commit/a6a1c3051dbd2cc5ccc70272890cf38d11dca9c7 DIFF: https://github.com/llvm/llvm-project/commit/a6a1c3051dbd2cc5ccc70272890cf38d11dca9c7.diff

<    1   2   3   4   >