================
@@ -1687,13 +1687,16 @@ Sema::BuildCXXTypeConstructExpr(TypeSourceInfo *TInfo,
// to false.
bool IsListInit = ListInitialization ||
(getLangOpts().HLSL && isa<InitListExpr>(Result.get()));
- SourceRange Locs = IsListInit
- ? SourceRange()
- : SourceRange(LParenOrBraceLoc, RParenOrBraceLoc);
- Result = CXXFunctionalCastExpr::Create(
- Context, ResultType, Expr::getValueKindForType(Ty), TInfo, CK_NoOp,
- Result.get(), /*Path=*/nullptr, CurFPFeatureOverrides(),
- Locs.getBegin(), Locs.getEnd());
+ if (IsListInit)
----------------
ojhunt wrote:
@IvyXu420 I think this is a reasonable suggestion
https://github.com/llvm/llvm-project/pull/228340
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits