-
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
Fix for issue #373 #408
Fix for issue #373 #408
Conversation
clang/lib/3C/ConstraintVariables.cpp
Outdated
for (auto It = Vars.begin(); It != Vars.end(); It++, Idx++) { | ||
getQualString(Idx, S); | ||
} | ||
|
||
return S.str(); |
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.
It looks like this could generate i.e. "const const" if you have const int * const * a
or something like that. So the function name is appropriate. But it seems to be used below as a single qualifier. Is that correct?
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.
Some code formatting/testing changes + one concern about a function.
@aaronjeline Let me know if you need help with the |
typedef int * * const a; | ||
//CHECK: typedef const _Ptr<_Ptr<int>> a; | ||
void xxx(void) { | ||
a b; |
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.
Since this rewrites const (or removes it), you can add a check here, maybe even with a comment on why it's ok to add/remove it.
I had an idea for a new test of the "3C generated changes to this file even though it is not allowed to write to the file" error. This code is simple but crazy enough that we may not have to update the test again for a while, if ever.
void
#include "partial_defn.h"
foo(int *x) {} Then Update: Since I have to make other changes to |
Also change the unimplemented canWrite constraints case from a typedef to a crazy #include in anticipation of #408.
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 reviewing only the canWrite constraints portion of this PR. There are a few things I'd like to see added.
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.
Nothing to add to open issues in the comments. Seems OK on quick glance, beyond this.
Co-authored-by: Matt McCutchen (Correct Computation) <[email protected]>
Co-authored-by: Matt McCutchen (Correct Computation) <[email protected]>
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.
The root-cause and canWrite stuff looks good to me now; thanks!
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 think all the substantial work is done for this PR. There are a few formatting issue I commented on, but looks good otherwise.
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 think the parts I know about are OK modulo this comment.
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 think this is good to go. It should fix at least one of the compilation errors for Lua.
Fantastic! Let's get it in there. :) |
No description provided.