On 05.03.2012, at 17:58, [email protected] wrote:

> +
> +/**
> + * Callback that is called before a function is compiled.

s/function/file/ or maybe s/a/any/ ? The way it is doesn't sound right.

> + *
> + * Before this function is called, the callbacks object will have all of its
> + * pointers set to null. All non-null callbacks will be deleted by the 
> compiler
> + * internally, so one should always return a new pointer for every file.
> + *
> + * \arg fileName  The name of the function being called.
> + * \arg callbacks The pointer to the callbacks that this plugin will define 
> for
> + *                this file.
> + */
> +extern void clang_plugin_begin_file(llvm::StringRef fileName,
> +  PluginFileCallbacks *callbacks);
> +
> +/**
> + * Callback that is called after a function has been compiled.

Same here.

> + *
> + * \arg fileName  The name of the function being called.
> + */
> +extern void clang_plugin_end_file(llvm::StringRef fileName);

I still think plugins should be capable of transforming the AST and passing the 
modified AST down the line (for code augmentation), but this looks like an 
excellent first step.

Sebastian


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to