diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-05-15 20:40:03 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-07-08 10:55:49 -0400 |
commit | 8e3342889e86d70c670f833351f1eb9ad19eeb4e (patch) | |
tree | adca6c67c052fae7613ee7d47f2570b0153778f4 /gcc | |
parent | 964a8141e1953e28ae236d1a2f1732c91f458cf6 (diff) | |
download | gcc-8e3342889e86d70c670f833351f1eb9ad19eeb4e.zip gcc-8e3342889e86d70c670f833351f1eb9ad19eeb4e.tar.gz gcc-8e3342889e86d70c670f833351f1eb9ad19eeb4e.tar.bz2 |
[Ada] Style cleanups related to Current_Condition
gcc/ada/
* einfo.ads (Current_Value): Fix typo in comment.
* exp_ch2.adb (Expand_Current_Value): Remove unnecessary "Start
of processing ..." comment.
* exp_util.adb (Set_Entity_Current_Value): Fix unbalanced paren
in comment.
(Get_Current_Value_Condition): Fix layout in comment.
* sem_ch5.adb (Analyze_Cond_Then): Replace commented condition
with pragma Assert.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/einfo.ads | 2 | ||||
-rw-r--r-- | gcc/ada/exp_ch2.adb | 2 | ||||
-rw-r--r-- | gcc/ada/exp_util.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sem_ch5.adb | 2 |
4 files changed, 4 insertions, 6 deletions
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 7138b9d..7bb1f16 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -822,7 +822,7 @@ package Einfo is -- Defined in all object entities. Set in E_Variable, E_Constant, formal -- parameters and E_Loop_Parameter entities if we have trackable current -- values. Set non-Empty if the (constant) current value of the variable --- is known, This value is valid only for references from the same +-- is known. This value is valid only for references from the same -- sequential scope as the entity. The sequential scope of an entity -- includes the immediate scope and any contained scopes that are package -- specs, package bodies, blocks (at any nesting level) or statement diff --git a/gcc/ada/exp_ch2.adb b/gcc/ada/exp_ch2.adb index b8ac2cd..407ffcb 100644 --- a/gcc/ada/exp_ch2.adb +++ b/gcc/ada/exp_ch2.adb @@ -122,8 +122,6 @@ package body Exp_Ch2 is Val : Node_Id; Op : Node_Kind; - -- Start of processing for Expand_Current_Value - begin if True diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index d93788b8..236d9ce 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -6418,7 +6418,7 @@ package body Exp_Util is if Loc < Sloc (CV) then return; - -- After end of IF statement + -- After end of IF statement elsif Loc >= Sloc (CV) + Text_Ptr (UI_To_Int (End_Span (CV))) then return; @@ -12741,7 +12741,7 @@ package body Exp_Util is -- they occur at the same level. If the second one is nested, -- then the decision is neither right nor wrong (it would be -- equally OK to leave the outer one in place, or take the new - -- inner one. Really we should record both, but our data + -- inner one). Really we should record both, but our data -- structures are not that elaborate. if Nkind (Current_Value (Ent)) not in N_Subexpr then diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index 4028d02..4664df8 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -1833,7 +1833,7 @@ package body Sem_Ch5 is -- If condition is False, analyze THEN with expansion off - else -- Is_False (Expr_Value (Cond)) + else pragma Assert (Is_False (Expr_Value (Cond))); Expander_Mode_Save_And_Set (False); In_Deleted_Code := True; Analyze_Statements (Tstm); |