diff options
author | Richard Smith <richard@metafoo.co.uk> | 2019-12-05 13:37:35 -0800 |
---|---|---|
committer | Richard Smith <richard@metafoo.co.uk> | 2019-12-09 17:40:36 -0800 |
commit | 848934c67d484da737b4b92c087bffce069b24ba (patch) | |
tree | 85ddebae5f1249c32ef844f92e8477946c01f1cf /clang/lib/Sema/SemaLambda.cpp | |
parent | 6507e13589687b40530dedc4dec670f2c1bfdc71 (diff) | |
download | bcm5719-llvm-848934c67d484da737b4b92c087bffce069b24ba.tar.gz bcm5719-llvm-848934c67d484da737b4b92c087bffce069b24ba.zip |
[c++20] Fix handling of unqualified lookups from a defaulted comparison
function.
We need to perform unqualified lookups from the context of a defaulted
comparison, but not until we implicitly define the function, at which
point we can't do those lookups any more. So perform the lookup from the
end of the class containing the =default declaration and store the
lookup results on the defaulted function until we synthesize the body.
Diffstat (limited to 'clang/lib/Sema/SemaLambda.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLambda.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp index 14b443e9dac..d09a3377d2b 100644 --- a/clang/lib/Sema/SemaLambda.cpp +++ b/clang/lib/Sema/SemaLambda.cpp @@ -1252,7 +1252,7 @@ void Sema::ActOnLambdaError(SourceLocation StartLoc, Scope *CurScope, SmallVector<Decl*, 4> Fields(Class->fields()); ActOnFields(nullptr, Class->getLocation(), Class, Fields, SourceLocation(), SourceLocation(), ParsedAttributesView()); - CheckCompletedCXXClass(Class); + CheckCompletedCXXClass(nullptr, Class); PopFunctionScopeInfo(); } @@ -1798,7 +1798,7 @@ ExprResult Sema::BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, SmallVector<Decl*, 4> Fields(Class->fields()); ActOnFields(nullptr, Class->getLocation(), Class, Fields, SourceLocation(), SourceLocation(), ParsedAttributesView()); - CheckCompletedCXXClass(Class); + CheckCompletedCXXClass(nullptr, Class); } Cleanup.mergeFrom(LambdaCleanup); |