[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:20:14 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:

Alright, filed a bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114773

https://github.com/llvm/llvm-project/pull/88265


More information about the cfe-commits mailing list