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

rieske / trans / 34116200815
94%

Build:
DEFAULT BRANCH: master
Ran 07 Sep 2026 11:26AM UTC
Jobs 1
Files 274
Run time 1min
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

07 Sep 2026 11:21AM UTC coverage: 94.416% (+0.003%) from 94.413%
34116200815

push

github

web-flow
fix: reject declarations that reach code generation with nothing to bind (#297)

Two constructs passed semantic analysis and failed later, one of them
by crashing.

A function declarator carrying an initializer was accepted, then hit
CodeGeneratingVisitor with no procedure open:

    int f() = 1;    ->  CodeGeneratingVisitor: emit outside of a
                        procedure body

At block scope the same declaration instead dereferenced a null holder
inside a procedure. Testing the resolved type in
analyzeInitializedDeclarator covers both scopes, and leaves
int (*fp)() = 0 alone, a pointer to a function being an object. This
completes the family the typedef rejection started: a declarator that
binds no object has nothing for an initializer to initialize.

A statement expression at file scope opened a block scope with no
enclosing function scope, after which SymbolTable read functionScopes
back() on an empty vector - SIGSEGV in a release build. Four routes
reached it, all now diagnosed:

    int g = ({ int q; q = 3; q; });
    int g = ({ static int q = 1; q; });
    int a[({ int q; q = 2; q; })];
    typedef int T[({ int q; q = 2; q; })];

visit(ast::Block&) is the only door to a block scope and a statement
expression is the only node that reaches one from file scope, so a
single guard closes all four. Setting the expression type before
returning keeps a later "expression type is not set" from replacing
the diagnostic.

Statement expressions inside functions and nested blocks are
unaffected, as are extern int x = 1, plain prototypes, initialized
function pointers, and a static declaration with its definition.

15573 of 16494 relevant lines covered (94.42%)

155804.35 hits per line

Coverage Regressions

Lines Coverage ∆ File
17
93.87
0.05% home/runner/work/trans/trans/src/semantic_analyzer/SemanticAnalysisVisitor_Expressions.cpp
11
92.31
0.1% home/runner/work/trans/trans/src/semantic_analyzer/SemanticAnalysisVisitor.cpp
Jobs
ID Job ID Ran Files Coverage
1 34116200815.1 07 Sep 2026 11:26AM UTC 274
94.42
GitHub Action Run
Source Files on build 34116200815
  • Tree
  • List 274
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34116200815
  • f482d065 on github
  • Prev Build on master (#34111469960)
  • Next Build on master (#34118940464)
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