llmcpp-compiler-diagnostics
Table of Contents
Compiler diagnostics (llmcpp)
Compiler diagnostics give the agent concrete feedback when a candidate violates C++ rules. The checking tool distinguishes failure from successful compilation with or without warnings:
if (r.m_ok && r.m_warnings == 0) { return {"OK: the body compiles without errors or warnings.", false}; } if (r.m_ok) { return {formatv("OK with {0} warning(s):\n{1}", r.m_warnings, r.m_text).str(), false}; } return {formatv("FAILED with {0} error(s):\n{1}", r.m_errors, r.m_text).str(), false};
This is the result-handling part of try_compile. The text contains compiler-generated diagnostics, allowing an agent to revise a missing name, type mismatch, or invalid access using evidence from Clang.
A failed candidate check does not itself consume a submission attempt. The agent can revise within its tool budget before calling submit. Diagnostics still cannot reject every wrong algorithm: returning the wrong numerical result can be perfectly valid C++.
Source: agent_tool_server.cpp.
llmcpp-compiler-diagnostics.md · Last modified: by 127.0.0.1
