forked from OSchip/llvm-project
c92056d038
Implements [[ https://wg21.link/p2071r1 | P2071 Named Universal Character Escapes ]] - as an extension in all language mode, the patch not warn in c++23 mode will be done later once this paper is plenary approved (in July). We add * A code generator that transforms `UnicodeData.txt` and `NameAliases.txt` to a space efficient data structure that can be queried in `O(NameLength)` * A set of functions in `Unicode.h` to query that data, including * A function to find an exact match of a given Unicode character name * A function to perform a loose (ignoring case, space, underscore, medial hyphen) matching * A function returning the best matching codepoint for a given string per edit distance * Support of `\N{}` escape sequences in String and character Literals, with loose and typos diagnostics/fixits * Support of `\N{}` as UCN with loose matching diagnostics/fixits. Loose matching is considered an error to match closely the semantics of P2071. The generated data contributes to 280kB of data to the binaries. `UnicodeData.txt` and `NameAliases.txt` are not committed to the repository in this patch, and regenerating the data is a manual process. Reviewed By: tahonermann Differential Revision: https://reviews.llvm.org/D123064 |
||
---|---|---|
.. | ||
Inputs | ||
atomic-property.m | ||
auto-fixit.m | ||
auto-isa-fixit.m | ||
bridge-cast-in-arc.mm | ||
bridge-in-non-arc.m | ||
dereference-addressof.c | ||
fixit-add-synthesize-to-property.m | ||
fixit-autoreleasepool.m | ||
fixit-availability-maccatalyst.m | ||
fixit-availability.c | ||
fixit-availability.mm | ||
fixit-c++2a.cpp | ||
fixit-c++11.cpp | ||
fixit-c90.c | ||
fixit-class-method-messaging.m | ||
fixit-cxx-init-order.cpp | ||
fixit-cxx1y-compat.cpp | ||
fixit-cxx11-attributes.cpp | ||
fixit-cxx11-compat.cpp | ||
fixit-eof-space.c | ||
fixit-errors-1.c | ||
fixit-errors.c | ||
fixit-format-darwin.m | ||
fixit-format-ios-nopedantic.m | ||
fixit-format-ios.m | ||
fixit-function-call.cpp | ||
fixit-include.c | ||
fixit-include.h | ||
fixit-interface-as-param.m | ||
fixit-large-file.cpp | ||
fixit-missing-method-return-type.m | ||
fixit-missing-self-in-block.m | ||
fixit-multiple-selector-warnings.m | ||
fixit-newline-style.c | ||
fixit-nsstring-compare.m | ||
fixit-nullability-declspec.cpp | ||
fixit-objc-arc.m | ||
fixit-objc-bridge-related-attr.m | ||
fixit-objc-bridge-related-property.m | ||
fixit-objc-bridge-related.m | ||
fixit-objc-direct.m | ||
fixit-objc-message-comma-separator.m | ||
fixit-objc-message.m | ||
fixit-objc-missing-method-impl.m | ||
fixit-objc.m | ||
fixit-pmem.cpp | ||
fixit-pragma-attribute.c | ||
fixit-pragma-attribute.cpp | ||
fixit-pragma-pack.c | ||
fixit-recompile.c | ||
fixit-recursive-block.c | ||
fixit-static-assert.cpp | ||
fixit-static-object-decl.m | ||
fixit-suffix.c | ||
fixit-typedef-instead-of-typename-typo.cpp | ||
fixit-unicode-named-escape-sequences.c | ||
fixit-unicode-with-utf8-output.c | ||
fixit-unicode.c | ||
fixit-uninit.c | ||
fixit-unrecoverable.c | ||
fixit-unrecoverable.cpp | ||
fixit-unused-lambda-capture.cpp | ||
fixit-vexing-parse-cxx0x.cpp | ||
fixit-vexing-parse.cpp | ||
fixit.c | ||
fixit.cpp | ||
format-darwin.m | ||
format-no-fixit.m | ||
format.m | ||
format.mm | ||
member-mismatch.cpp | ||
messages.cpp | ||
multiarg-selector-fixit.m | ||
no-diagnostics-fixit-info.c | ||
no-fixit.cpp | ||
no-macro-fixit.c | ||
no-typo.c | ||
nullability.mm | ||
objc-literals.m | ||
property-access-fixit.m | ||
selector-fixit.m | ||
typo-crash.cpp | ||
typo-crash.m | ||
typo-location-bugs.cpp | ||
typo-using.cpp | ||
typo.c | ||
typo.cpp | ||
typo.m |