[clang-tools-extra] [clangd] Fix RawStringLiteral being available to C and C++ versions prior to C++11 (PR #69775)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 22 20:56:09 PDT 2023


================
@@ -76,7 +82,7 @@ bool RawStringLiteral::prepare(const Selection &Inputs) {
   if (!N)
     return false;
   Str = dyn_cast_or_null<StringLiteral>(N->ASTNode.get<Stmt>());
-  return Str &&
+  return Str && isFeatureAvailable(Inputs) &&
----------------
HighCommander4 wrote:

I would move this language mode check to the very top of `prepare()` (e.g. there is no point doing the work of `commonAncestor()` if this check fails).

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


More information about the cfe-commits mailing list