Fixing Harvey's bugs Automagically

permalink: ffbyt.es/mBHQ

27 June 2016


How we fix harvey's bugs automagically

How it works

Both gcc and clang, but more notoriously clang come with very useful diagnostic messages

main.c:153:6: warning: use of GNU 'missing =' extension in designator
[16]    "r5g6b5",

but clang also exposes these diagnostic messages to the programmes via libclang. As I wrote in a previous post, the most important thing I wanted to do with build was not just building stuff but was rather creating a library that can be used from a cli too. Infact build was insipred by that libclang philosophy.

Clang exposes the information needed to fix the source code in form of FixIt messages, this requires the compiler flags and the actual files too but since build exposes that information we can programatically fix the files that need fixing.

You can view the code here.

By Sevki

Related articles