]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++, contracts: Add a contract scope per basic.scope.contract.
authorIain Sandoe <iain@sandoe.co.uk>
Fri, 31 Oct 2025 11:02:13 +0000 (11:02 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Wed, 28 Jan 2026 01:23:18 +0000 (01:23 +0000)
commit918aa3fe87f8966e53941dfafa403b1b77cab2dc
tree2133a5a47dc5e89f9dff7b29694853588e7c7804
parent4e1f6865ac54799473bb1d9f207c42999873363c
c++, contracts: Add a contract scope per basic.scope.contract.

This adds a scope for contract assertions as per the standard section
referenced.  Split out here because it is the only part of the implementation
that touches the name lookup files.

gcc/cp/ChangeLog:

* cp-tree.h (processing_contract_condition): New.
* name-lookup.cc (cp_binding_level_descriptor): Add contract scope.
(begin_scope): Likewise.
* name-lookup.h (enum scope_kind): Add sk_contract.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/cp-tree.h
gcc/cp/name-lookup.cc
gcc/cp/name-lookup.h