[clang] [Clang] Allow raw string literals in C as an extension (PR #88265)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 18 11:15:15 PDT 2024
================
@@ -130,6 +130,12 @@ struct LangStandard {
/// hasDigraphs - Language supports digraphs.
bool hasDigraphs() const { return Flags & Digraphs; }
+ /// hasRawStringLiterals - Language supports R"()" raw string literals.
+ bool hasRawStringLiterals() const {
+ // GCC supports raw string literals in C, but not in C++ before C++11.
+ return isCPlusPlus11() || (!isCPlusPlus() && isGNUMode());
----------------
Sirraide wrote:
I’ll file a GCC bug report about it. In the meantime, should we be conservative and disallow them in gnu89 mode?
https://github.com/llvm/llvm-project/pull/88265
More information about the cfe-commits
mailing list