Skip to content
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

[SR-10915] Diagnostic remarks emitted from Clang are silently discarded #53306

Closed
belkadan opened this issue Jun 11, 2019 · 8 comments
Closed
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers

Comments

@belkadan
Copy link
Contributor

Previous ID SR-10915
Radar rdar://problem/51628698
Original Reporter @belkadan
Type Bug
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, ClangImporter, StarterBug
Assignee @vguerra
Priority Medium

md5: 9ed938a545065b4b95fa01593662d56e

Issue Description:

Diagnostics come in four flavors: errors, warnings, remarks, and notes. Errors and warnings indicate issues, while remarks are just informative messages. Notes are attached to errors/warnings/remarks to provide additional explanations or suggestions of how to fix an issue.

When Swift started, Clang had remarks but Swift did not; since they were purely informational, Swift just discarded them. Now Swift does support remarks, but we never went back to hook them up to the Clang diagnostic producer.

@belkadan
Copy link
Contributor Author

Starter bug instructions: The place to fix this is the switch in ClangDiagnosticConsumer::HandleDiagnostic, by mimicking what we do for warnings. When you're ready to write a test case, ping me, and I'll find a Clang remark for you that's easy to make happen from Swift.

@vguerra
Copy link
Contributor

vguerra commented Jun 12, 2019

hi @belkadan,
would like to work on this one, ok w/you? 🙂

@belkadan
Copy link
Contributor Author

Go for it! Feel free to assign it to yourself while you're working on it.

I'll go find a test case for you.

@belkadan
Copy link
Contributor Author

It looks like the best one is -Xcc -Rmodule-import, which should say "importing module 'Blah'" when importing a C module. test/ClangImporter/requires.swift has a similar setup for a test, so you could duplicate that and check the expected output.

@vguerra
Copy link
Contributor

vguerra commented Jun 12, 2019

thank you @belkadan for the pointers.

@vguerra
Copy link
Contributor

vguerra commented Jun 18, 2019

Opened #25585

@vguerra
Copy link
Contributor

vguerra commented Jun 21, 2019

Related to this task:

@vguerra
Copy link
Contributor

vguerra commented Jun 21, 2019

All PRs related to this task are merged.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants