diff options
author | Pranav Kant <prka@google.com> | 2024-04-26 00:18:08 +0000 |
---|---|---|
committer | Pranav Kant <prka@google.com> | 2024-04-26 00:18:08 +0000 |
commit | 0c6e1ca1c704a3a0fb53ae54f7e3723736f477c7 (patch) | |
tree | d37068c5c994c1a90ba67d13f3a682d9dfd41331 /clang/lib/Sema/SemaOpenMP.cpp | |
parent | 45fc0e6b38b62a61b0ddcda2e7fe9b4fee7e3e58 (diff) | |
download | llvm-0c6e1ca1c704a3a0fb53ae54f7e3723736f477c7.zip llvm-0c6e1ca1c704a3a0fb53ae54f7e3723736f477c7.tar.gz llvm-0c6e1ca1c704a3a0fb53ae54f7e3723736f477c7.tar.bz2 |
Revert "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (#84050)"
This reverts commit a8fd0d029dca7d17eee72d0445223c2fe1ee7758.
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index cf5447f..cee8da4 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -3061,9 +3061,7 @@ ExprResult SemaOpenMP::ActOnOpenMPIdExpression(Scope *CurScope, OpenMPDirectiveKind Kind) { ASTContext &Context = getASTContext(); LookupResult Lookup(SemaRef, Id, Sema::LookupOrdinaryName); - SemaRef.LookupParsedName(Lookup, CurScope, &ScopeSpec, - /*ObjectType=*/QualType(), - /*AllowBuiltinCreation=*/true); + SemaRef.LookupParsedName(Lookup, CurScope, &ScopeSpec, true); if (Lookup.isAmbiguous()) return ExprError(); @@ -7409,8 +7407,7 @@ void SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope( const IdentifierInfo *BaseII = D.getIdentifier(); LookupResult Lookup(SemaRef, DeclarationName(BaseII), D.getIdentifierLoc(), Sema::LookupOrdinaryName); - SemaRef.LookupParsedName(Lookup, S, &D.getCXXScopeSpec(), - /*ObjectType=*/QualType()); + SemaRef.LookupParsedName(Lookup, S, &D.getCXXScopeSpec()); TypeSourceInfo *TInfo = SemaRef.GetTypeForDeclarator(D); QualType FType = TInfo->getType(); @@ -19314,8 +19311,7 @@ buildDeclareReductionRef(Sema &SemaRef, SourceLocation Loc, SourceRange Range, if (S) { LookupResult Lookup(SemaRef, ReductionId, Sema::LookupOMPReductionName); Lookup.suppressDiagnostics(); - while (S && SemaRef.LookupParsedName(Lookup, S, &ReductionIdScopeSpec, - /*ObjectType=*/QualType())) { + while (S && SemaRef.LookupParsedName(Lookup, S, &ReductionIdScopeSpec)) { NamedDecl *D = Lookup.getRepresentativeDecl(); do { S = S->getParent(); @@ -22184,8 +22180,7 @@ static ExprResult buildUserDefinedMapperRef(Sema &SemaRef, Scope *S, LookupResult Lookup(SemaRef, MapperId, Sema::LookupOMPMapperName); Lookup.suppressDiagnostics(); if (S) { - while (S && SemaRef.LookupParsedName(Lookup, S, &MapperIdScopeSpec, - /*ObjectType=*/QualType())) { + while (S && SemaRef.LookupParsedName(Lookup, S, &MapperIdScopeSpec)) { NamedDecl *D = Lookup.getRepresentativeDecl(); while (S && !S->isDeclScope(D)) S = S->getParent(); @@ -23502,9 +23497,7 @@ void SemaOpenMP::DiagnoseUnterminatedOpenMPDeclareTarget() { NamedDecl *SemaOpenMP::lookupOpenMPDeclareTargetName( Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id) { LookupResult Lookup(SemaRef, Id, Sema::LookupOrdinaryName); - SemaRef.LookupParsedName(Lookup, CurScope, &ScopeSpec, - /*ObjectType=*/QualType(), - /*AllowBuiltinCreation=*/true); + SemaRef.LookupParsedName(Lookup, CurScope, &ScopeSpec, true); if (Lookup.isAmbiguous()) return nullptr; |