Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Sema/SemaExpr.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 15,705 Lines • ▼ Show 20 Lines | if (getLangOpts().CPlusPlus && Cap.isCopyCapture()) { | ||||
Result = ImpCastExprToType(Result.get(), | Result = ImpCastExprToType(Result.get(), | ||||
Result.get()->getType().withConst(), | Result.get()->getType().withConst(), | ||||
CK_NoOp, VK_LValue); | CK_NoOp, VK_LValue); | ||||
} | } | ||||
if (!Result.isInvalid()) { | if (!Result.isInvalid()) { | ||||
Result = PerformCopyInitialization( | Result = PerformCopyInitialization( | ||||
InitializedEntity::InitializeBlock(Var->getLocation(), | InitializedEntity::InitializeBlock(Var->getLocation(), | ||||
Cap.getCaptureType(), false), | Cap.getCaptureType()), | ||||
Loc, Result.get()); | Loc, Result.get()); | ||||
} | } | ||||
// Build a full-expression copy expression if initialization | // Build a full-expression copy expression if initialization | ||||
// succeeded and used a non-trivial constructor. Recover from | // succeeded and used a non-trivial constructor. Recover from | ||||
// errors by pretending that the copy isn't necessary. | // errors by pretending that the copy isn't necessary. | ||||
if (!Result.isInvalid() && | if (!Result.isInvalid() && | ||||
!cast<CXXConstructExpr>(Result.get())->getConstructor() | !cast<CXXConstructExpr>(Result.get())->getConstructor() | ||||
▲ Show 20 Lines • Show All 4,162 Lines • Show Last 20 Lines |