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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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;
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
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
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
@@ -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
@@ -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-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
@@ -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
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
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
@@ -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
@@ -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
@@ -1359,17 +1361,18 @@ void ThreadSafetyAnalyzer::getMutexIDs(CapExprSet
&Mtxs, AttrType *Attr,
const Expr *Exp, const NamedDecl *D,
const CFGBlock *PredBlock,
@@ -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.
--
@@ -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
@@ -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
@@ -1359,17 +1361,18 @@ void ThreadSafetyAnalyzer::getMutexIDs(CapExprSet
&Mtxs, AttrType *Attr,
const Expr *Exp, const NamedDecl *D,
const CFGBlock *PredBlock,
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
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
___
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
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
@@ -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
@@ -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
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
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
__
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
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
+
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
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
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
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
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
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
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
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
101 - 200 of 379 matches
Mail list logo