OLD | NEW |
1 //////////////////////////////////////////////////////////////////////////////// | 1 //////////////////////////////////////////////////////////////////////////////// |
2 // Note: This file is a work in progress. Please do not apply non-trivial | 2 // Note: This file is a work in progress. Please do not apply non-trivial |
3 // updates unless you have talked to Sean Hunt <rideau3@gmail.com> prior. | 3 // updates unless you have talked to Sean Hunt <rideau3@gmail.com> prior. |
4 // Merely adding a new attribute is a trivial update. | 4 // Merely adding a new attribute is a trivial update. |
5 //////////////////////////////////////////////////////////////////////////////// | 5 //////////////////////////////////////////////////////////////////////////////// |
6 | 6 |
7 // An attribute's subject is whatever it appertains to. In this file, it is | 7 // An attribute's subject is whatever it appertains to. In this file, it is |
8 // more accurately a list of things that an attribute can appertain to. All | 8 // more accurately a list of things that an attribute can appertain to. All |
9 // Decls and Stmts are possibly AttrSubjects (even though the syntax may not | 9 // Decls and Stmts are possibly AttrSubjects (even though the syntax may not |
10 // allow attributes on a given Decl or Stmt). | 10 // allow attributes on a given Decl or Stmt). |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 class BoolArgument<string name> : Argument<name>; | 49 class BoolArgument<string name> : Argument<name>; |
50 class IdentifierArgument<string name> : Argument<name>; | 50 class IdentifierArgument<string name> : Argument<name>; |
51 class IntArgument<string name> : Argument<name>; | 51 class IntArgument<string name> : Argument<name>; |
52 class StringArgument<string name> : Argument<name>; | 52 class StringArgument<string name> : Argument<name>; |
53 class ExprArgument<string name> : Argument<name>; | 53 class ExprArgument<string name> : Argument<name>; |
54 class FunctionArgument<string name> : Argument<name>; | 54 class FunctionArgument<string name> : Argument<name>; |
55 class TypeArgument<string name> : Argument<name>; | 55 class TypeArgument<string name> : Argument<name>; |
56 class UnsignedArgument<string name> : Argument<name>; | 56 class UnsignedArgument<string name> : Argument<name>; |
57 class VariadicUnsignedArgument<string name> : Argument<name>; | 57 class VariadicUnsignedArgument<string name> : Argument<name>; |
| 58 class VariadicExprArgument<string name> : Argument<name>; |
58 | 59 |
59 // A version of the form major.minor[.subminor]. | 60 // A version of the form major.minor[.subminor]. |
60 class VersionArgument<string name> : Argument<name>; | 61 class VersionArgument<string name> : Argument<name>; |
61 | 62 |
62 // This one's a doozy, so it gets its own special type | 63 // This one's a doozy, so it gets its own special type |
63 // It can be an unsigned integer, or a type. Either can | 64 // It can be an unsigned integer, or a type. Either can |
64 // be dependent. | 65 // be dependent. |
65 class AlignedArgument<string name> : Argument<name>; | 66 class AlignedArgument<string name> : Argument<name>; |
66 | 67 |
67 // An integer argument with a default value | 68 // An integer argument with a default value |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 def ScopedLockable : InheritableAttr { | 558 def ScopedLockable : InheritableAttr { |
558 let Spellings = ["scoped_lockable"]; | 559 let Spellings = ["scoped_lockable"]; |
559 } | 560 } |
560 | 561 |
561 def NoThreadSafetyAnalysis : InheritableAttr { | 562 def NoThreadSafetyAnalysis : InheritableAttr { |
562 let Spellings = ["no_thread_safety_analysis"]; | 563 let Spellings = ["no_thread_safety_analysis"]; |
563 } | 564 } |
564 | 565 |
565 def GuardedBy : InheritableAttr { | 566 def GuardedBy : InheritableAttr { |
566 let Spellings = ["guarded_by"]; | 567 let Spellings = ["guarded_by"]; |
| 568 let Args = [ExprArgument<"Arg">]; |
567 } | 569 } |
568 | 570 |
569 def PtGuardedBy : InheritableAttr { | 571 def PtGuardedBy : InheritableAttr { |
570 let Spellings = ["pt_guarded_by"]; | 572 let Spellings = ["pt_guarded_by"]; |
| 573 let Args = [ExprArgument<"Arg">]; |
571 } | 574 } |
572 | 575 |
573 def AcquiredAfter : InheritableAttr { | 576 def AcquiredAfter : InheritableAttr { |
574 let Spellings = ["acquired_after"]; | 577 let Spellings = ["acquired_after"]; |
| 578 let Args = [VariadicExprArgument<"Args">]; |
575 } | 579 } |
576 | 580 |
577 def AcquiredBefore : InheritableAttr { | 581 def AcquiredBefore : InheritableAttr { |
578 let Spellings = ["acquired_before"]; | 582 let Spellings = ["acquired_before"]; |
| 583 let Args = [VariadicExprArgument<"Args">]; |
579 } | 584 } |
580 | 585 |
581 def ExclusiveLockFunction : InheritableAttr { | 586 def ExclusiveLockFunction : InheritableAttr { |
582 let Spellings = ["exclusive_lock_function"]; | 587 let Spellings = ["exclusive_lock_function"]; |
| 588 let Args = [VariadicExprArgument<"Args">]; |
583 } | 589 } |
584 | 590 |
585 def SharedLockFunction : InheritableAttr { | 591 def SharedLockFunction : InheritableAttr { |
586 let Spellings = ["shared_lock_function"]; | 592 let Spellings = ["shared_lock_function"]; |
| 593 let Args = [VariadicExprArgument<"Args">]; |
587 } | 594 } |
588 | 595 |
589 def ExclusiveTrylockFunction : InheritableAttr { | 596 def ExclusiveTrylockFunction : InheritableAttr { |
590 let Spellings = ["exclusive_trylock_function"]; | 597 let Spellings = ["exclusive_trylock_function"]; |
| 598 let Args = [VariadicExprArgument<"Args">]; |
591 } | 599 } |
592 | 600 |
593 def SharedTrylockFunction : InheritableAttr { | 601 def SharedTrylockFunction : InheritableAttr { |
594 let Spellings = ["shared_trylock_function"]; | 602 let Spellings = ["shared_trylock_function"]; |
| 603 let Args = [VariadicExprArgument<"Args">]; |
595 } | 604 } |
596 | 605 |
597 def UnlockFunction : InheritableAttr { | 606 def UnlockFunction : InheritableAttr { |
598 let Spellings = ["unlock_function"]; | 607 let Spellings = ["unlock_function"]; |
| 608 let Args = [VariadicExprArgument<"Args">]; |
599 } | 609 } |
600 | 610 |
601 def LockReturned : InheritableAttr { | 611 def LockReturned : InheritableAttr { |
602 let Spellings = ["lock_returned"]; | 612 let Spellings = ["lock_returned"]; |
| 613 let Args = [ExprArgument<"Arg">]; |
603 } | 614 } |
604 | 615 |
605 def LocksExcluded : InheritableAttr { | 616 def LocksExcluded : InheritableAttr { |
606 let Spellings = ["locks_excluded"]; | 617 let Spellings = ["locks_excluded"]; |
| 618 let Args = [VariadicExprArgument<"Args">]; |
607 } | 619 } |
608 | 620 |
609 def ExclusiveLocksRequired : InheritableAttr { | 621 def ExclusiveLocksRequired : InheritableAttr { |
610 let Spellings = ["exclusive_locks_required"]; | 622 let Spellings = ["exclusive_locks_required"]; |
| 623 let Args = [VariadicExprArgument<"Args">]; |
611 } | 624 } |
612 | 625 |
613 def SharedLocksRequired : InheritableAttr { | 626 def SharedLocksRequired : InheritableAttr { |
614 let Spellings = ["shared_locks_required"]; | 627 let Spellings = ["shared_locks_required"]; |
| 628 let Args = [VariadicExprArgument<"Args">]; |
615 } | 629 } |
OLD | NEW |