[cfe-dev] Plugin argument parsing
s3306700 at inf.tu-dresden.de
Sun Aug 1 12:09:51 CDT 2010
Is there a way to access Clang's Diagnostic from inside the ParseArgs
function of a plugin? I tried to grab it via the CompilerInstance but at
that time getCompilerInstance fails since the instance isn't set yet.
It would be good to get errors/warnings during the argument parsing out
through Clang's Diagnostic so they count in the total.
Another issue: How do I terminate Clang once a fatal error occurs during
the parsing, e.g. some essential information is missing. Returning
'false' doesn't do the trick. In fact the return value is just dropped
by Clang. So I just do an 'exit(1)' which works fine. Are there any
problems this can cause, like inconsistent state somewhere?
More information about the cfe-dev