aboutsummaryrefslogtreecommitdiff
path: root/include/cps/FunctionGen.h
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-21 14:03:31 +0000
committer_ov4 <ov4@ov4.org>2026-10-21 14:03:31 +0000
commitb4ffb2d9498560557821714e2d4651279dd6817c (patch)
tree995ad02bdb8cc461f48a53683c4fd7f2ddd8656b /include/cps/FunctionGen.h
parentf1f5fa394a67a789914ccf2b24d534a0e466ae1b (diff)
feat(diagnostics): print source diagnostics in gcc file:line: layout
Lexer, parser, driver and codegen diagnostics now read "<path>:<line>: error: <message>" instead of "error: <message> at line N in <path>". The path is always printed as given on the command line. Call sites pass the bare message to cps::sourceError/sourceWarning, which carry printf format checking; reportError routes through the same helper. The suite iii harness parses the new layout and matches the reason against the message only. iii/template-class-pack-field passed only because its reason regex matched the case path, so it is now case-insensitive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/FunctionGen.h')
-rw-r--r--include/cps/FunctionGen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/cps/FunctionGen.h b/include/cps/FunctionGen.h
index a50e70b..a176e84 100644
--- a/include/cps/FunctionGen.h
+++ b/include/cps/FunctionGen.h
@@ -72,7 +72,7 @@ private:
IdentifierMap<SymbolInfo> &Symbols;
bool &HadError;
int &DiagnosticLine;
- void reportError(const char *Fmt, ...);
+ __attribute__((format(printf, 2, 3))) void reportError(const char *Fmt, ...);
IdentifierMap<std::deque<FuncSig>> Signatures;
IdentifierMap<std::pair<std::string, size_t>> LinkIndex;