You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Facade warnings point at file:1:1 under with run/build (correct under with check) #1498
use c_import("typedef struct db db;
typedef struct st st;
db* db_new(int flags);
void db_close(db* d);
st* st_new(db* d, int n);
void st_free(st* s);
")
c facade dep:
resource Database wraps *mut db
from db_new
drop db_close
resource Statement wraps *mut st
from st_new
drop st_free
fn main:
print("ok")
with check runwarn.w places the facade warning correctly:
warning: resource 'Statement': no constructor is rendered for producer 'st_new': …
--> runwarn.w:13:5
with run runwarn.w prints the same warning at the wrong place:
warning: resource 'Statement': no constructor is rendered for producer 'st_new': …
--> runwarn.w:1:1
1 |
Expected:run (and build) report the same location as check. The facade diagnostics set the source context to the facade block's declaration (SemaFacade.w update_decl_source_context(self.facade_resources[ri].decl), stage 5); the run/build path renders warnings against a span/file mapping that does not match — not yet located.
Also seen on modeled-C stage 6's returns borrow warning under run with the real sqlite3.h. Found while implementing stage 6; not fixed there.
Activity
Warnings under `run` and `build` name their lines: the compilation ke…
C backend and modeled-C fixes: map loops, generic structs, view compa…