Unverified Commit 5989450e authored by The Phantom Derpstorm's avatar The Phantom Derpstorm Committed by GitHub
Browse files

[clang][Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (#68620)

This commit implements the entirety of the now-accepted [N3017 -
Preprocessor
Embed](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3017.htm) and
its sister C++ paper [p1967](https://wg21.link/p1967

). It implements
everything in the specification, and includes an implementation that
drastically improves the time it takes to embed data in specific
scenarios (the initialization of character type arrays). The mechanisms
used to do this are used under the "as-if" rule, and in general when the
system cannot detect it is initializing an array object in a variable
declaration, will generate EmbedExpr AST node which will be expanded
by AST consumers (CodeGen or constant expression evaluators) or
expand embed directive as a comma expression.

---------

Co-authored-by: default avatarAaron Ballman <aaron@aaronballman.com>
Co-authored-by: default avatarcor3ntin <corentinjabot@gmail.com>
Co-authored-by: default avatarH. Vetinari <h.vetinari@gmx.com>
Co-authored-by: default avatarPodchishchaeva, Mariya <mariya.podchishchaeva@intel.com>
parent b83f8c75
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment