Commit 81c8f261 by Piotr Trojanek Committed by Pierre-Marie de Rodat

[Ada] Simplify conditions by removing always true conjuncts

Checking "Original_Node (N) /= N" is equivalent to "Is_Rewrite_Substitution
(N)", which is checked just two lines before. Trivial simplification,
semantics unaffected.

2018-05-30  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* sem_prag.adb (Analyze_Pragma): Remove conjuncts that are always true.

From-SVN: r260934
parent 56a05ce0
2018-05-30 Piotr Trojanek <trojanek@adacore.com>
* sem_prag.adb (Analyze_Pragma): Remove conjuncts that are always true.
2018-05-30 Hristian Kirtchev <kirtchev@adacore.com> 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb (Is_Atomic_Object): Cleaned up. Split the entity logic * sem_util.adb (Is_Atomic_Object): Cleaned up. Split the entity logic
......
...@@ -11104,7 +11104,7 @@ package body Sem_Prag is ...@@ -11104,7 +11104,7 @@ package body Sem_Prag is
-- Here to start processing for recognized pragma -- Here to start processing for recognized pragma
Pname := Original_Aspect_Pragma_Name (N); Pname := Original_Aspect_Pragma_Name (N);
-- Capture setting of Opt.Uneval_Old -- Capture setting of Opt.Uneval_Old
...@@ -11135,7 +11135,6 @@ package body Sem_Prag is ...@@ -11135,7 +11135,6 @@ package body Sem_Prag is
elsif Is_Rewrite_Substitution (N) elsif Is_Rewrite_Substitution (N)
and then Nkind (Original_Node (N)) = N_Pragma and then Nkind (Original_Node (N)) = N_Pragma
and then Original_Node (N) /= N
then then
Set_Is_Ignored (N, Is_Ignored (Original_Node (N))); Set_Is_Ignored (N, Is_Ignored (Original_Node (N)));
Set_Is_Checked (N, Is_Checked (Original_Node (N))); Set_Is_Checked (N, Is_Checked (Original_Node (N)));
...@@ -13293,7 +13292,6 @@ package body Sem_Prag is ...@@ -13293,7 +13292,6 @@ package body Sem_Prag is
elsif Is_Rewrite_Substitution (N) elsif Is_Rewrite_Substitution (N)
and then Nkind (Original_Node (N)) = N_Pragma and then Nkind (Original_Node (N)) = N_Pragma
and then Original_Node (N) /= N
then then
Set_Is_Ignored (N, Is_Ignored (Original_Node (N))); Set_Is_Ignored (N, Is_Ignored (Original_Node (N)));
Set_Is_Checked (N, Is_Checked (Original_Node (N))); Set_Is_Checked (N, Is_Checked (Original_Node (N)));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment