-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[ObjC][Preprocessor] Handle @import directive as a pp-directive #157726
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: yronglin <[email protected]>
Signed-off-by: yronglin <[email protected]>
Signed-off-by: yronglin <[email protected]>
…les_dependency_discovery
Signed-off-by: yronglin <[email protected]>
…in a file Signed-off-by: yronglin <[email protected]>
Signed-off-by: yronglin <[email protected]>
Signed-off-by: yronglin <[email protected]>
Signed-off-by: yronglin <[email protected]>
Signed-off-by: yronglin <[email protected]>
Signed-off-by: Wang, Yihan <[email protected]>
Signed-off-by: Wang, Yihan <[email protected]>
Signed-off-by: Wang, Yihan <[email protected]>
Signed-off-by: yronglin <[email protected]>
This reverts commit 27ab41f.
Signed-off-by: yronglin <[email protected]>
Signed-off-by: yronglin <[email protected]>
Signed-off-by: yronglin <[email protected]>
Signed-off-by: yronglin <[email protected]>
Signed-off-by: Wang, Yihan <[email protected]>
…rsing the ill-formed module/import directive which was not correctly recognized in preprocessor Signed-off-by: Wang, Yihan <[email protected]>
Signed-off-by: Wang, Yihan <[email protected]>
…ve unecessary changes Signed-off-by: Wang, Yihan <[email protected]>
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
Signed-off-by: Wang, Yihan <[email protected]>
204dd21 to
8a77b45
Compare
|
friendly ping~ |
Bigcheese
left a 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.
The code changes here look fine, but it would be good to have some more test examples. Particularly around things like:
#define M modA
@import M;
and cases that shouldn't compile, like:
#define imp @import
imp M;
| auto ScEx2 = make_scope_exit( | ||
| [&]() { TheLexer.setParsingPreprocessorDirective(false); }); | ||
|
|
||
| // FIXME: Shoule we handle @import as a preprocessing directive? |
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.
Is this FIXME still relevant after this change?
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 catch, we should remove this comments
Thanks for the review, I'll add more test. |
Depends: #107168
This patch handle
@importas a preprocessing directive, and since this patch, the following import directive will be ill-formed:Only the last commit belongs to this patch, the other commits come from dependent patches