-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add instructions for how to add a diagnostic to gaiat #843
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
// 2) Use 'gaiat::diag().emit(...)' to get the diagnostics engine and pass in the error string. The IDs and other info | ||
// are generated from the DiagnosticsSemaKinds.td file and put into the 'diag' namespace. | ||
// | ||
// 3) You can set the source location to give the user line and column information about the error. This can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused about what we mean by "user line".
Should to give the user line and column information about the error
be to give line and column information about the error to the user
?
Or is there some other word missing there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should probably specify line and column number information
. And 'user' really means the rule author.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reminds me that we should specify that the line and column number are relative to the ruleset file and not the generated cpp. I remember there was some uncertainty about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Updated the text to make this more clear.
…rning group for gaia extensions
@@ -10,6 +10,32 @@ | |||
#include "clang/Basic/Diagnostic.h" | |||
#pragma clang diagnostic pop | |||
|
|||
// When adding errors strings to the translation engine, please use the llvm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
llvm -> LLVM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIXED :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just added a minor suggestion.
Thanks @LaurentiuCristofor and @simone-gaia |
Should have included instructions on how to add errors to gaiat going forward in the last PR.
Note: I'm also using this PR to push in a fix for an llvm-test break. I added a warning group for GaiaExtensions (gaia-extensions)