[clang] [clang][Lex] Don't parsing header name as a string literal (PR #201763)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 8 07:01:19 PDT 2026


================
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
+// expected-no-diagnostics
+
+#if __has_include("\")
----------------
AaronBallman wrote:

I presume this returns `false`? And should we have a test case for `#include "\"` to show that we give the correct diagnostic for not being able to include the file (to validate the "filename" is correct and we're not dropping the `\`)?

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


More information about the cfe-commits mailing list