Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:25
erlang
2514-stdlib-Ignore-SSA-check-clauses-in-erl_exp...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2514-stdlib-Ignore-SSA-check-clauses-in-erl_expand_record.patch of Package erlang
From 34eff5fc156c207ae9390ac69771f8c51ccbb1d6 Mon Sep 17 00:00:00 2001 From: Frej Drejhammar <frej.drejhammar@gmail.com> Date: Wed, 30 Nov 2022 13:13:08 +0100 Subject: [PATCH 04/13] stdlib: Ignore SSA check clauses in erl_expand_records and erl_lint Pass through SSA check clauses unmodified in the erl_expand_records and erl_lint passes. --- lib/stdlib/src/erl_expand_records.erl | 4 +++- lib/stdlib/src/erl_lint.erl | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/stdlib/src/erl_expand_records.erl b/lib/stdlib/src/erl_expand_records.erl index 964928c159..31442e5140 100644 --- a/lib/stdlib/src/erl_expand_records.erl +++ b/lib/stdlib/src/erl_expand_records.erl @@ -442,7 +442,9 @@ expr({op,Anno,Op,L0,R0}, St0) when Op =:= 'andalso'; expr({op,Anno,Op,L0,R0}, St0) -> {L,St1} = expr(L0, St0), {R,St2} = expr(R0, St1), - {{op,Anno,Op,L,R},St2}. + {{op,Anno,Op,L,R},St2}; +expr(E={ssa_check_when,_,_,_,_,_}, St) -> + {E, St}. expr_list([E0 | Es0], St0) -> {E,St1} = expr(E0, St0), diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl index 7f26c28a1a..5c50a62857 100644 --- a/lib/stdlib/src/erl_lint.erl +++ b/lib/stdlib/src/erl_lint.erl @@ -2567,7 +2567,10 @@ expr({op,_Anno,_Op,L,R}, Vt, St) -> expr_list([L,R], Vt, St); %They see the same variables %% The following are not allowed to occur anywhere! expr({remote,_Anno,M,_F}, _Vt, St) -> - {[],add_error(erl_parse:first_anno(M), illegal_expr, St)}. + {[],add_error(erl_parse:first_anno(M), illegal_expr, St)}; +expr({ssa_check_when,_Anno,_WantedResult,_Args,_Tag,_Exprs}, _Vt, St) -> + {[], St}. + %% expr_list(Expressions, Variables, State) -> %% {UsedVarTable,State} -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor