aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-01-27 22:17:16 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-06-04 11:59:19 +0000
commit390adc38fc112be360bd15499e5241bf4e675b6f (patch)
tree712d68d3aa03f7aa4902ba03dcac2a56f49ae0e5 /contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp
parent8a84287b0edc66fc6dede3db770d10ff41da5464 (diff)
downloadsrc-390adc38fc112be360bd15499e5241bf4e675b6f.tar.gz
src-390adc38fc112be360bd15499e5241bf4e675b6f.zip
Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-14-init-17616-g024a1fab5c35. PR: 261742 MFC after: 2 weeks (cherry picked from commit 04eeddc0aa8e0a417a16eaf9d7d095207f4a8623)
Diffstat (limited to 'contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp
index 54f0242d2ca1..b34b744d7312 100644
--- a/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp
+++ b/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp
@@ -6614,7 +6614,7 @@ QualType Sema::FindCompositePointerType(SourceLocation Loc,
const Type *ClassOrBound;
Step(Kind K, const Type *ClassOrBound = nullptr)
- : K(K), Quals(), ClassOrBound(ClassOrBound) {}
+ : K(K), ClassOrBound(ClassOrBound) {}
QualType rebuild(ASTContext &Ctx, QualType T) const {
T = Ctx.getQualifiedType(T, Quals);
switch (K) {
@@ -7410,8 +7410,10 @@ ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base,
// the member function body.
if (!BaseType->isDependentType() &&
!isThisOutsideMemberFunctionBody(BaseType) &&
- RequireCompleteType(OpLoc, BaseType, diag::err_incomplete_member_access))
- return ExprError();
+ RequireCompleteType(OpLoc, BaseType,
+ diag::err_incomplete_member_access)) {
+ return CreateRecoveryExpr(Base->getBeginLoc(), Base->getEndLoc(), {Base});
+ }
// C++ [basic.lookup.classref]p2:
// If the id-expression in a class member access (5.2.5) is an
@@ -7767,7 +7769,8 @@ ExprResult Sema::ActOnPseudoDestructorExpr(Scope *S, Expr *Base,
TypeLocBuilder TLB;
DecltypeTypeLoc DecltypeTL = TLB.push<DecltypeTypeLoc>(T);
- DecltypeTL.setNameLoc(DS.getTypeSpecTypeLoc());
+ DecltypeTL.setDecltypeLoc(DS.getTypeSpecTypeLoc());
+ DecltypeTL.setRParenLoc(DS.getTypeofParensRange().getEnd());
TypeSourceInfo *DestructedTypeInfo = TLB.getTypeSourceInfo(Context, T);
PseudoDestructorTypeStorage Destructed(DestructedTypeInfo);
@@ -8697,7 +8700,7 @@ Sema::ActOnTypeRequirement(SourceLocation TypenameKWLoc, CXXScopeSpec &SS,
if (TypeName) {
QualType T = CheckTypenameType(ETK_Typename, TypenameKWLoc,
SS.getWithLocInContext(Context), *TypeName,
- NameLoc, &TSI, /*DeducedTypeContext=*/false);
+ NameLoc, &TSI, /*DeducedTSTContext=*/false);
if (T.isNull())
return nullptr;
} else {
@@ -8748,7 +8751,7 @@ Sema::ActOnCompoundRequirement(
/*HasTypeConstraint=*/true);
if (BuildTypeConstraint(SS, TypeConstraint, TParam,
- /*EllpsisLoc=*/SourceLocation(),
+ /*EllipsisLoc=*/SourceLocation(),
/*AllowUnexpandedPack=*/true))
// Just produce a requirement with no type requirements.
return BuildExprRequirement(E, /*IsSimple=*/false, NoexceptLoc, {});