aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2012-03-30 09:26:00 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2012-03-30 11:26:00 +0200
commit5b0113d67139911a6d51c1232adce252821684eb (patch)
tree31ef6fc3cb5f5e200e92e502f1ed6be9382e2712 /gcc/ada/lib-xref.adb
parent23e7bf6a4e4ac29e1914b2da55d460e12f0d2b8c (diff)
downloadgcc-5b0113d67139911a6d51c1232adce252821684eb.zip
gcc-5b0113d67139911a6d51c1232adce252821684eb.tar.gz
gcc-5b0113d67139911a6d51c1232adce252821684eb.tar.bz2
lib-xref.adb, [...]: Minor reformatting & code reorganization.
2012-03-30 Robert Dewar <dewar@adacore.com> * lib-xref.adb, lib-xref-alfa.adb: Minor reformatting & code reorganization. From-SVN: r186003
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r--gcc/ada/lib-xref.adb37
1 files changed, 13 insertions, 24 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index a328bea..af5a69e 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -639,9 +639,7 @@ package body Lib.Xref is
or else
(Alfa_Mode
and then In_Extended_Main_Code_Unit (N)
- and then (Typ = 'm'
- or else Typ = 'r'
- or else Typ = 's'))
+ and then (Typ = 'm' or else Typ = 'r' or else Typ = 's'))
then
null;
else
@@ -893,34 +891,25 @@ package body Lib.Xref is
and then
(Instantiation_Location (Sloc (N)) = No_Location
- or else Typ = 'i'
- or else Alfa_Mode)
+ or else Typ = 'i'
+ or else Alfa_Mode)
- -- Ignore dummy references
+ -- Ignore dummy references
and then Typ /= ' '
then
- if Nkind (N) = N_Identifier
- or else
- Nkind (N) = N_Defining_Identifier
- or else
- Nkind (N) in N_Op
- or else
- Nkind (N) = N_Defining_Operator_Symbol
- or else
- Nkind (N) = N_Operator_Symbol
- or else
- (Nkind (N) = N_Character_Literal
- and then Sloc (Entity (N)) /= Standard_Location)
- or else
- Nkind (N) = N_Defining_Character_Literal
+ if Nkind_In (N, N_Identifier,
+ N_Defining_Identifier,
+ N_Defining_Operator_Symbol,
+ N_Operator_Symbol,
+ N_Defining_Character_Literal)
+ or else Nkind (N) in N_Op
+ or else (Nkind (N) = N_Character_Literal
+ and then Sloc (Entity (N)) /= Standard_Location)
then
Nod := N;
- elsif Nkind (N) = N_Expanded_Name
- or else
- Nkind (N) = N_Selected_Component
- then
+ elsif Nkind_In (N, N_Expanded_Name, N_Selected_Component) then
Nod := Selector_Name (N);
else