[clang] [clang] fix classification of a string literal expression used as initializer (PR #101447)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 31 21:35:31 PDT 2024


================
@@ -119,8 +119,6 @@ static Cl::Kinds ClassifyInternal(ASTContext &Ctx, const Expr *E) {
 
     // First come the expressions that are always lvalues, unconditionally.
   case Expr::ObjCIsaExprClass:
-    // C++ [expr.prim.general]p1: A string literal is an lvalue.
-  case Expr::StringLiteralClass:
     // @encode is equivalent to its string
   case Expr::ObjCEncodeExprClass:
----------------
efriedma-quic wrote:

I think we also need to handle ObjCEncodeExprClass the same way.

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


More information about the cfe-commits mailing list