[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.
This commit is contained in:
parent
964a8141e1
commit
8e3342889e
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user