================
@@ -4745,7 +4760,10 @@ Sema::CreateUnaryExprOrTypeTraitExpr(Expr *E, 
SourceLocation OpLoc,
 
   // C99 6.5.3.4p4: the type (an unsigned integer type) is size_t.
   return new (Context) UnaryExprOrTypeTraitExpr(
-      ExprKind, E, Context.getSizeType(), OpLoc, E->getSourceRange().getEnd());
+      ExprKind, E,
+      Context.getCGlobalCXXStdNSTypedef(getStdNamespace(), "size_t",
+                                        Context.getSizeType()),
+      OpLoc, E->getSourceRange().getEnd());
----------------
YexuanXiao wrote:

Is it appropriate to change it to `getLangOpts().CPlusPlus ? getStdNamespace() 
: nullptr`? I’m concerned that moving it into `getSizeType` might introduce 
unintended effects.

https://github.com/llvm/llvm-project/pull/136542
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to