Commit Graph

12 Commits

Author SHA1 Message Date
Anthony Latsis
2cd90bdd69 AST: Quote attributes more consistently in DiagnosticsSema.def 2025-04-22 18:23:36 +01:00
Alexis Laferrière
c6b282156e Sema: Update other tests for newly more precise diagnostics 2025-04-11 11:34:40 -07:00
Doug Gregor
8cd2f34654 Generalize tests for both diagnostic styles, or force the LLVM style
These tests are using FileCheck to check the result of diagnostic
formatting in ways that don't match the new formatter. Force the old
formatter or, where possible, generalize so that they match both
formatters.
2024-02-19 02:48:37 -10:00
Becca Royal-Gordon
39115425b7 Rephrase all access note remarks
• There is now one access note success remark and fix-it per declaration, not per attribute/modifier.
• Failure remarks have been rephrased to better emphasize the cause of the failure.
• The wording of other access note remarks and notes have been changed to follow a similar formula.
2021-05-22 13:01:29 -07:00
Becca Royal-Gordon
a6a9dfede0 Add option to control access note diagnostics
This will allow teams writing access notes to use -Raccess-note=all-validate to check that their access notes are correct, or teams working around problems to use -Raccess-note=failures or -Raccess-note=none to suppress diagnostics.
2021-05-22 13:01:29 -07:00
Becca Royal-Gordon
ef97f5c338 [NFC] Handle Windows error spelling difference
lolsob
2021-02-10 13:44:58 -08:00
Becca Royal-Gordon
c250165037 Fix attempts to fix Windows tests 2021-02-10 11:46:46 -08:00
Becca Royal-Gordon
8d0040fa2b Improve access note error handling
The LLVM rebranch added an “AllowUnknownKeys” setting to llvm::yaml::Input, which lets us rip out a lot of marginal code and encourages a broader rework of access note error diagnosis:

• Access note warnings and errors are now diagnosed as they’re found during YAML parsing
• They now have proper SourceLocs inside the .accessnotes file
• They’re now tested using -verify-additional-file instead of FileCheck
• A lot of gross duct tape is now gone
2021-02-10 00:29:34 -08:00
Becca Royal-Gordon
622d64928b [NFC] Fix Windows driver tests 2021-02-09 14:17:35 -08:00
Becca Royal-Gordon
276393f596 [NFC] Note missing access note validation 2021-02-09 14:17:35 -08:00
Becca Royal-Gordon
bf13139495 Allow unknown keys in access notes
LLVM’s YAML support wants to show a hard error if an unknown string appears in an access note. Instead, emit a remark but load the parts of the access note we do understand to allow for future expansion of access notes.
2021-02-09 14:17:35 -08:00
Becca Royal-Gordon
e42294737f Handle access note I/O and parse errors 2021-02-09 14:17:35 -08:00