[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421723. cor3ntin added a comment. Fix in nameToCodepointLoose Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang/include/clang/Basic/DiagnosticLexKinds.t

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421721. cor3ntin added a comment. - Add tests - Cleanups - Optimization of nearestMatchesForCodepointName to only allocate when necessary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://rev

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421562. cor3ntin added a comment. Add fix hint tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang/include/clang/Basic/DiagnosticLexKinds.td clang

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a subscriber: aaron.ballman. cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:130-131 def ext_delimited_escape_sequence : Extension< - "delimited escape sequences are a Clang extension">, + "%select{delimited|named}0

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 420971. cor3ntin added a comment. Recover from valid but loosly matched character names in identifiers more gracefully Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 420946. cor3ntin added a comment. - Typo fixes for invalid code points Add a method `NearestMatchesForCodepointName` that will return the N closest valid codepoints, by edit distance. This is used to detect typos in named escape sequences in literals. - Add

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-05 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. This looks pretty good to me. I added a few comments. I mostly just reviewed the lexer related code; I didn't dive into the name matching code. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:130-131 def ext_delimited_escape_sequence

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 420521. cor3ntin added a comment. - Support loose matching - Modifiy the binary format to make it easier to have a root node Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 420422. cor3ntin added a comment. Add lexing tests, improve diagnostics. As a drive by, this also fix the handling of `\U{123}` which was a non diagnosed invalid escape sequence, leading to some assertion failure. Repository: rG LLVM Github Monorepo CHAN

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 420319. cor3ntin added a comment. Add Unit tests for nameToCodepoint Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang/include/clang/Basic/DiagnosticLex

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 420286. cor3ntin added a comment. Fix generator Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang/include/clang/Basic/DiagnosticLexKinds.td clang/incl

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 420278. cor3ntin added a comment. Herald added a subscriber: mgrang. Committed the wrong file! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang/include

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added subscribers: dexonsmith, hiraditya, mgorny, dschuff. Herald added a project: All. cor3ntin requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. ! Missing tests, some cleanup still ne