This is an archive of the discontinued LLVM Phabricator instance.

[Parser] Use special definition for pragma annotations
ClosedPublic

Authored by sepavloff on Jul 29 2019, 10:01 AM.

Details

Summary

Previously pragma annotation tokens were described as any other
annotations in TokenKinds.def. This change introduces special macro
PRAGMA_ANNOTATION for the pragma descriptions. It allows implementing
checks that deal with pragma annotations only.

Diff Detail

Repository
rL LLVM

Event Timeline

sepavloff created this revision.Jul 29 2019, 10:01 AM
Herald added a project: Restricted Project. · View Herald Transcript
jdoerfert resigned from this revision.Jul 29 2019, 11:03 PM

LGTM, although I don't think it would be ridiculous to make this an inline function definition like isAnnotation. (I like your generated implementation much better than the sequential ifs used there, though.)

This revision was not accepted when it landed; it landed in state Needs Review.Aug 1 2019, 8:14 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2019, 8:14 AM

LGTM, although I don't think it would be ridiculous to make this an inline function definition like isAnnotation.

Thank you!
The fix for isAnnotation is D65670.