Skip to content

Conversation

@AaronBallman
Copy link
Contributor

The new MutualExclusions tablegen facilities allow us to remove a bunch
of custom diagnostic checking code. This also fixes an issue with the
upstream implementation of the MutualExclusions facilities for
DeclOrStmtAttr attributes.

The new MutualExclusions tablegen facilities allow us to remove a bunch
of custom diagnostic checking code. This also fixes an issue with the
upstream implementation of the MutualExclusions facilities for
DeclOrStmtAttr attributes.
Copy link
Contributor

@smanna12 smanna12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

bool CurAttrIsStmtAttr =
Attr.isSubClassOf("StmtAttr") || Attr.isSubClassOf("DeclOrStmtAttr");
bool CurAttrIsDeclAttr =
!CurAttrIsStmtAttr || Attr.isSubClassOf("DeclOrStmtAttr");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AaronBallman, isn't the second bool the same as:
!Attr.isSubClassOf("StmtAttr") || Attr.isSubClassOf("DeclOrStmtAttr");

Wouldn't this match anything that is not StmtAttr?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct.

There are three kinds of attributes (four-ish if you count pragmas, but those never get here): type, stmt, and decl. We bail out early if it's a type attribute on line 3664, so by this point it should either be a statement attr, a decl attr, or both.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you want to handle this PR? Is there a separate PR to address statement attributes? I just don't want us to lose track of it. I will approve this one, assuming that one won't fall through the cracks.

Copy link
Contributor

@smanna12 smanna12 Apr 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a separate PR to address statement attributes?

I think so. Here is the discussion:
Originally posted by @AaronBallman in #3507 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Statement attributes need more love; I'm working on that refactoring currently. If it looks like that refactoring has to be set down for some reason, I'll file an issue about it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@premanandrao, @AaronBallman, is this conversation resolved or I should wait for PR updates?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not expecting to change this PR further unless I've missed something or there are other concerns.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@premanandrao, @AaronBallman, is this conversation resolved or I should wait for PR updates?

Sorry, I should have been more explicit. I considered this resolved.

@bader bader merged commit a504f72 into intel:sycl Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants