diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-14 15:46:36 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-14 15:46:36 +0200 |
commit | 51bf9bdffff02529ce6331fda689e0d2fde3100f (patch) | |
tree | a0283a841af37f2fc802a622bdd4010911b38019 /gcc/ada/atree.ads | |
parent | ae24748803fb1d0de3fd2f3c2f0f8363dc14417f (diff) | |
download | gcc-51bf9bdffff02529ce6331fda689e0d2fde3100f.tar.gz |
[multiple changes]
2010-06-14 Robert Dewar <dewar@adacore.com>
* opt.ads (Check_Policy_List): Add some clarifying comments
* sem_prag.adb (Analyze_Pragma, case Check): Set Pragma_Enabled flag
on rewritten Assert pragma.
2010-06-14 Gary Dismukes <dismukes@adacore.com>
* sem_ch6.adb (Check_Overriding_Indicator): Add a special check for
controlled operations, so that they will be treated as overriding even
if the overridden subprogram is marked Is_Hidden, as long as the
overridden subprogram's parent subprogram is not hidden.
2010-06-14 Robert Dewar <dewar@adacore.com>
* debug.adb: Entry for gnatw.d no longer specific for while loops
* einfo.adb (First_Exit_Statement): New attribute for E_Loop
* einfo.ads (First_Exit_Statement): New attribute for E_Loop
* sem_ch5.adb (Analyze_Loop_Statement): Check_Infinite_Loop_Warning has
new calling sequence to include test for EXIT WHEN.
(Analyze_Exit_Statement): Chain EXIT statement into exit statement chain
* sem_warn.ads, sem_warn.adb (Check_Infinite_Loop_Warning): Now handles
EXIT WHEN case.
* sinfo.adb (Next_Exit_Statement): New attribute of N_Exit_Statement
node.
* sinfo.ads (N_Pragma): Correct comment on Sloc field (points to
PRAGMA, not to pragma identifier).
(Next_Exit_Statement): New attribute of N_Exit_Statement node
2010-06-14 Robert Dewar <dewar@adacore.com>
* sem_res.adb (Resolve_Short_Circuit): Fix sloc of "assertion/check
would fail" msg.
2010-06-14 Robert Dewar <dewar@adacore.com>
* par-ch2.adb (Scan_Pragma_Argument_Association): Clarify message for
missing pragma argument identifier.
2010-06-14 Robert Dewar <dewar@adacore.com>
* atree.ads, atree.adb (Ekind_In): New functions
2010-06-14 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**N in stand alone context
2010-06-14 Robert Dewar <dewar@adacore.com>
* usage.adb (Usage): Redo documentation of -gnatwa.
From-SVN: r160743
Diffstat (limited to 'gcc/ada/atree.ads')
-rw-r--r-- | gcc/ada/atree.ads | 72 |
1 files changed, 70 insertions, 2 deletions
diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads index da0b28874c6..2f61374a6e9 100644 --- a/gcc/ada/atree.ads +++ b/gcc/ada/atree.ads @@ -543,8 +543,12 @@ package Atree is -- Tests given Id for inequality with the Empty node. This allows notations -- like "if Present (Statement)" as opposed to "if Statement /= Empty". - -- Node_Kind tests, like the functions in Sinfo, but the first argument is - -- a Node_Id, and the tested field is Nkind (N). + --------------------- + -- Node_Kind Tests -- + --------------------- + + -- These are like the functions in Sinfo, but the first argument is a + -- Node_Id, and the tested field is Nkind (N). function Nkind_In (N : Node_Id; @@ -617,6 +621,70 @@ package Atree is pragma Inline (Nkind_In); -- Inline all above functions + ----------------------- + -- Entity_Kind_Tests -- + ----------------------- + + -- Utility functions to test whether an Entity_Kind value, either given + -- directly as the first argument, or the Ekind field of an Entity give + -- as the first argument, matches any of the given list of Entity_Kind + -- values. Return True if any match, False if no match. + + function Ekind_In + (E : Entity_Id; + V1 : Entity_Kind; + V2 : Entity_Kind) return Boolean; + + function Ekind_In + (E : Entity_Id; + V1 : Entity_Kind; + V2 : Entity_Kind; + V3 : Entity_Kind) return Boolean; + + function Ekind_In + (E : Entity_Id; + V1 : Entity_Kind; + V2 : Entity_Kind; + V3 : Entity_Kind; + V4 : Entity_Kind) return Boolean; + + function Ekind_In + (E : Entity_Id; + V1 : Entity_Kind; + V2 : Entity_Kind; + V3 : Entity_Kind; + V4 : Entity_Kind; + V5 : Entity_Kind) return Boolean; + + function Ekind_In + (T : Entity_Kind; + V1 : Entity_Kind; + V2 : Entity_Kind) return Boolean; + + function Ekind_In + (T : Entity_Kind; + V1 : Entity_Kind; + V2 : Entity_Kind; + V3 : Entity_Kind) return Boolean; + + function Ekind_In + (T : Entity_Kind; + V1 : Entity_Kind; + V2 : Entity_Kind; + V3 : Entity_Kind; + V4 : Entity_Kind) return Boolean; + + function Ekind_In + (T : Entity_Kind; + V1 : Entity_Kind; + V2 : Entity_Kind; + V3 : Entity_Kind; + V4 : Entity_Kind; + V5 : Entity_Kind) return Boolean; + + pragma Inline (Ekind_In); + -- Inline all above functions + ----------------------------- -- Entity Access Functions -- ----------------------------- |