Skip to content

Conversation

@hnrklssn
Copy link
Member

This adds test/Frontend/DiagnosticVerifier/clang-attribute.swift, and then makes a series of improvements to the output.
I recommend reviewing commit by commit.

@hnrklssn
Copy link
Member Author

@swift-ci please smoke test

@hnrklssn
Copy link
Member Author

@hnrklssn
Copy link
Member Author

@swift-ci please smoke test

@hnrklssn hnrklssn mentioned this pull request Nov 18, 2025
...-verify-additional-file

It's not expected that users add macro expansion buffer names to
-verify-additional-file. The recommended approach is to add the actual
source file that the macro was expanded in, and use expected-expansion.
This won't affect diagnostic printing, as the diagnostic engine checks
the GeneratedSourceInfoKind and stops expanding if it's an
AttributeFromClang kind. This helps the diagnostic verifier expand to
the original location in source code however.
This makes it more explicit and consistent, which are good properties
for test output. It makes it easier both for humans and
update-verify-tests to see what exactly is going on. This does not
affect how diagnostics are displayed to users normally.
`verifyUnknown()` and `verifyUnrelated()` would not remove the
diagnostics after reporting their errors, leading to the same
diagnostics then being emitted a second time. This removes them from the
list after emitting them, just like `verifyFile()` does.
Simply GSI->ancestors is not enough if the ancestors list has not been
populated yet. Ensure this is done by calling getAncestors.
@hnrklssn
Copy link
Member Author

Updated each commit with --sanitize TEST_H=%t%{fs-sep}test.h for Windows compat

@hnrklssn
Copy link
Member Author

@swift-ci please smoke test

@hnrklssn
Copy link
Member Author

@swift-ci please smoke test windows platform

1 similar comment
@hnrklssn
Copy link
Member Author

@swift-ci please smoke test windows platform

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.

1 participant