• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rieske / trans
94%
master: 94%

Build:
Build:
LAST BUILD BRANCH: cleanup/phase-2-deletions
DEFAULT BRANCH: master
Repo Added 08 Jan 2015 03:59PM UTC
Files 272
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH refactor/one-record-per-open-function
branch: refactor/one-record-per-open-function
CHANGE BRANCH
x
Reset
  • refactor/one-record-per-open-function
  • ast/binary-op-does-not-fold
  • ast/block-item
  • ast/drop-nodekind
  • ast/expr-kind-fold-and-calls
  • ast/expression-as-init-list
  • ast/for-init
  • ast/function-body-block
  • ast/node-kind-no-rtti
  • ast/statement-base
  • ast/statement-stack
  • ast/terminal-symbol-lexeme
  • ast/translation-unit-sum
  • build/cmake-idiomatic
  • build/coverage-ci-only
  • build/modernize/1
  • ci/ccache
  • ci/coveralls-retry
  • cleanup/phase-2-deletions
  • cleanup/unused-wrappers
  • diag/csnb-no-throw
  • diag/lex-record-sink
  • driver/default-att
  • driver/inline-component-factory
  • driver/opt-level
  • feat/array-redecl-composite
  • feat/array-value-decay
  • feat/asm-symbol
  • feat/att-backend
  • feat/automatic-array-init-decay
  • feat/bit-fields
  • feat/builtin-bswap
  • feat/c23-bool
  • feat/c99-compound-literals
  • feat/cc-driver-argv-walker
  • feat/char-array-string-init
  • feat/char-escapes
  • feat/complex-types
  • feat/compound-literals-gnu-complex
  • feat/const-volatile-struct-members
  • feat/core-unsigned-ops
  • feat/driver-c-o
  • feat/driver-ignore-cflags
  • feat/driver-link-passthrough
  • feat/driver-preprocess-passthrough
  • feat/driver-stages-temps
  • feat/drop-intermediate-logging
  • feat/drop-syntax-tree-dump
  • feat/else-if-unmatched
  • feat/expression-statements
  • feat/file-scope-object-redecl
  • feat/flexible-array-member
  • feat/float-sse-sysv
  • feat/float32-sse
  • feat/function-scope-static
  • feat/gcc-e-token-filter
  • feat/gcc-header-dependency-flags
  • feat/generic-selection
  • feat/gnu-builtin-constant-p
  • feat/gnu-builtin-ctz-alloca
  • feat/gnu-iso-dialect
  • feat/header-language-surface
  • feat/incomplete-extern-objects
  • feat/int128-arith
  • feat/int128-filter-unknown-token
  • feat/int128-literals
  • feat/int128-muldiv
  • feat/int128-shift
  • feat/int128-sysv-abi
  • feat/int128-widen-narrow
  • feat/integer-default-arg-promotions
  • feat/long-double
  • feat/long-double-arith
  • feat/mix-and-linkage-diag
  • feat/multi-tu
  • feat/multi-tu-driver-sources
  • feat/multilevel-pointers
  • feat/mutual-recursion
  • feat/narrow-integer-gpr-extend
  • feat/noreturn-function-specifier
  • feat/null-fnptr-param-adjust
  • feat/object-alignment
  • feat/offsetof
  • feat/param-vla-array-decay
  • feat/pie-executables
  • feat/pin-c-language-gaps
  • feat/preprocess-stdio
  • feat/real-increment
  • feat/restrict-in-array-brackets
  • feat/static-init-address
  • feat/static-init-address-as-integer
  • feat/static-init-address-constants
  • feat/static-init-wide-integer
  • feat/string-pool-bytes
  • feat/struct-object-result
  • feat/sysv-aggregate-abi
  • feat/sysv-eightbyte-classifier
  • feat/sysv-integer-return-serial
  • feat/type-assign-conversions
  • feat/typed-integer-constants
  • feat/typeof-expression-nodes
  • feat/typeof-member-arith
  • feat/typeof-parse-time-expressions
  • feat/typeof-specifier
  • feat/types-compatible-p
  • feat/variadic-ellipsis
  • feat/wide-integer-asm-immediates
  • feat/x87-st0-and-stack-align
  • feature/address-base-mode
  • feature/array-decay-multidim
  • feature/array-index-mw
  • feature/callplan-variant
  • feature/do-while
  • feature/file-scope-compound-literals
  • feature/file-scope-globals
  • feature/finish-for-git
  • feature/function-pointers
  • feature/goto-labels
  • feature/grammar-block-item-const-exp
  • feature/initializers
  • feature/recursive-type-sizeof
  • feature/result-on-store
  • feature/scanner-c-tokens
  • feature/struct-member-access
  • feature/structs
  • feature/structs-member-access
  • feature/switch-case
  • feature/ternary-conditional-exp
  • feature/type-casts
  • feature/vla-objects
  • feature/vla-pointer-stride
  • feature/vm-types-runtime-sizeof
  • fix-readme-build-badge
  • fix/address-of-subscript
  • fix/aggregate-zero-representation
  • fix/archive-is-linker-input
  • fix/block-scope-extern-and-enumerator-scoping
  • fix/block-scope-shadowing
  • fix/call-stack-alignment-and-variadic-al
  • fix/dereference-lvalue-store-back
  • fix/enum-large-underlying-type
  • fix/for-optional-clauses
  • fix/function-designator-typeops
  • fix/function-returning-fnptr-params
  • fix/fuzz-signed-div-pointer-arith
  • fix/gnu-packed-record-layout
  • fix/int128-non-first-member
  • fix/integer-memory-width
  • fix/integer-promotions-shift-unary
  • fix/integer-zero-pointer-width
  • fix/no-internal-errors-after-a-diagnostic
  • fix/pointer-compound-assign-subscript
  • fix/postfix-pre-operation-temporary
  • fix/record-member-sizeof-ice
  • fix/reject-initializers-that-bind-no-object
  • fix/required-annotations-fail-in-release
  • fix/resources-from-exe
  • fix/reuse-multiword-temp-stack-slots
  • fix/reuse-temp-stack-slots
  • fix/sign-extend-pointer-index
  • fix/silent-front-end-failures
  • fix/sizeof-designator-static-float
  • fix/stale-register-after-pointer-store
  • fix/uint32-alu-width
  • fix/unary-operand-double-visit
  • fix/variadic-array-decay
  • fix/void-parameter-list-unary-lvalue-dedup
  • fuzz/backend
  • grammar-cleanup
  • grammar/drop-const-exp-inline-operators
  • harden/p0-process-exit-ownership
  • ir/add-frame-temp
  • ir/cfg-container
  • ir/opcode-contract
  • l5-diag-sink-parse-csnb-io
  • l7-object-type-name-table
  • lang/fam-brace-init
  • lang/fam-string-init
  • master
  • opt/copy-propagate
  • opt/eliminate-dead-temps
  • opt/fold-compares
  • opt/fold-constants
  • opt/thread-jumps
  • opt/widen-dead-temps
  • optimize-parser-v1
  • optimize-parser-v2
  • parser-cleanup
  • parser/drop-parser-base
  • parser/drop-syntax-tree-product
  • perf/bake-product-parsing-table
  • perf/index-ast-creators-by-production-id
  • perf/ir-intern-ids
  • perf/parse-token-symbol-id
  • perf/parser/1-lookahead-model
  • perf/parser/2-automaton
  • perf/parser/3-action-table
  • perf/parser/4-tests-cleanup
  • perf/process-frontend-cache
  • perf/skip-gcc-e-when-unneeded
  • perf/sparse-parsing-table
  • perf/token-kind-span
  • performance/experimental-parser-generator-optimization
  • phase0/01-recursive-type
  • phase0/02-type-policy
  • phase0/03-object-abi
  • phase0/04-symbols-leaf
  • phase0/05-annotation-migration
  • phase0/06-package-graph
  • phase1/01-integer-type-specs
  • phase1/02-unions
  • phase1/03-forward-decl
  • phase1/04-anonymous-members
  • phase1/05-nested-init
  • phase1/06-designated-init
  • phase2/01-lexical-session
  • phase2/02-lex-id-context
  • phase2/03-parse-environment
  • phase2/04-enums
  • phase2/05-typedef
  • phase2/06-scanner-filters
  • refactor-fold-if-return
  • refactor-function-compatible-with
  • refactor-operator-enums
  • refactor-types
  • refactor/codegen-address-homes
  • refactor/codegen-address-phase1
  • refactor/consume-tokens-by-move
  • refactor/drop-leftover-includes
  • refactor/drop-operator-ast-node
  • refactor/drop-parsetree-and-unused-apis
  • refactor/drop-sa-reexport-headers
  • refactor/drop-unused-component-includes
  • refactor/drop-unused-product-code
  • refactor/ir-as-data
  • refactor/remove-unused-apis
  • refactor/remove-unused-includes
  • refactor/src-to-c-suffix
  • refactor/sysv-arg-sequence
  • refactor/visit-children-default
  • renovate/actions-cache-4.x
  • renovate/actions-cache-6.x
  • renovate/actions-checkout-3.x
  • renovate/actions-checkout-4.x
  • renovate/actions-checkout-7.x
  • renovate/actions-checkout-digest
  • renovate/configure
  • renovate/coverallsapp-github-action-1.x
  • renovate/coverallsapp-github-action-2.x
  • sa/find-no-throw
  • sa/function-frame-store
  • sa/import-enums-from-session
  • sa/one-function-value
  • sa/rodata-sizeof-store
  • sa/session-enum-facade
  • sa/source-name-keys
  • scan/dfa-interpreter-overhead
  • scanner/c-scoped-enumerators
  • scanner/c-scoped-typedefs
  • scanner/is-typedef-facade
  • scanner/parse-type-table
  • scanner/rename-typedef-api
  • test/decouple-harness-from-build-location
  • test/fix-semantic-error-source-indent
  • test/functional-coverage-gaps
  • test/git-shaped-define-args
  • test/ir-dump-from-c
  • test/local-shadows-function-name
  • test/pin-enum-vla-typedef-diagnostics
  • test/pin-l5-error-arms
  • test/pin-remaining-ir-opcode-dumps
  • test/pin-symbol-table-scope-keys
  • test/sysv-abi-interop-restructure
  • test/sysv-arg-pressure
  • test/sysv-layout-aggregates
  • test/sysv-return-pressure
  • test/sysv-stack-align
  • test/sysv-va-pressure
  • test/tier-a-c-coverage-gaps
  • tests/fuzz
  • tests/parallel-functional
  • types/detach-vla-bound-from-ast
  • types/share-function-payload
  • types/share-member-payload
  • update-readme
  • util/diagnostic-sink

07 Sep 2026 12:52PM UTC coverage: 94.419% (+0.002%) from 94.417%
34124257751

Pull #299

github

rieske
refactor: one record for the open function scope

SymbolTable kept two members encoding the same fact: functionScopes, a
vector that could never exceed size 1 because C has no nested function
definitions, and scopeIdStack, the block nesting inside it.
isAtFileScope() was defined on the second while guarding reads of the
first, so when enterBlockScope() pushed a scope id with no function
scope open the predicate claimed a function was open and
functionScopes.back() ran on an empty vector.

That state has been patched twice already, once by moving the
predicate onto the stack it guards and once by rejecting the construct
that produced it. Collapsing the two members into a single
optional<FunctionScope> removes the disagreement instead: there is one
place recording whether a function is open, so no future change can
update one and leave the other stale.

Every access goes through openFunction(), which throws rather than
reading an empty container. That covers five public entry points -
enterBlockScope, exitBlockScope, endFunction, getCurrentScopeSymbols
and getCurrentScopeArguments - which were undefined behaviour on an
empty vector before and were guarded by nothing.

nextScopeId stays outside the optional: block ids must not repeat
across functions, since frame-local object names embed them.

The unit test that pinned the old workaround is replaced by one
asserting the state is now refused, and a characterization test covers
the cross-function id invariant that the collapse must not break.
Pull Request #299: refactor: one record for the open function scope

15581 of 16502 relevant lines covered (94.42%)

155803.6 hits per line

Relevant lines Covered
Build:
Build:
16502 RELEVANT LINES 15581 COVERED LINES
155803.6 HITS PER LINE
Source Files on refactor/one-record-per-open-function
  • Tree
  • List 274
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
34124257751 refactor/one-record-per-open-function refactor: one record for the open function scope SymbolTable kept two members encoding the same fact: functionScopes, a vector that could never exceed size 1 because C has no nested function definitions, and scopeIdStack, the block nesting inside... Pull #299 07 Sep 2026 12:57PM UTC rieske github
94.42
See All Builds (1238)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc