Lines Matching refs:SemaRef
517 static bool isTagTypeWithMissingTag(Sema &SemaRef, LookupResult &Result, in isTagTypeWithMissingTag() argument
521 LookupResult R(SemaRef, Name, NameLoc, Sema::LookupTagName); in isTagTypeWithMissingTag()
522 SemaRef.LookupParsedName(R, S, &SS); in isTagTypeWithMissingTag()
553 SemaRef.Diag(NameLoc, diag::err_use_of_tag_name_without_tag) in isTagTypeWithMissingTag()
554 << Name << TagName << SemaRef.getLangOpts().CPlusPlus in isTagTypeWithMissingTag()
559 SemaRef.Diag((*I)->getLocation(), diag::note_decl_hiding_tag_type) in isTagTypeWithMissingTag()
564 SemaRef.LookupParsedName(Result, S, &SS); in isTagTypeWithMissingTag()
2798 static bool CheckAnonMemberRedeclaration(Sema &SemaRef, in CheckAnonMemberRedeclaration() argument
2804 LookupResult R(SemaRef, Name, NameLoc, Sema::LookupMemberName, in CheckAnonMemberRedeclaration()
2806 if (!SemaRef.LookupName(R, S)) return false; in CheckAnonMemberRedeclaration()
2815 if (!SemaRef.isDeclInScope(PrevDecl, Owner, S)) in CheckAnonMemberRedeclaration()
2818 SemaRef.Diag(NameLoc, diagnostic) << Name; in CheckAnonMemberRedeclaration()
2819 SemaRef.Diag(PrevDecl->getLocation(), diag::note_previous_declaration); in CheckAnonMemberRedeclaration()
2840 static bool InjectAnonymousStructOrUnionMembers(Sema &SemaRef, Scope *S, in InjectAnonymousStructOrUnionMembers() argument
2859 if (CheckAnonMemberRedeclaration(SemaRef, S, Owner, VD->getDeclName(), in InjectAnonymousStructOrUnionMembers()
2882 new (SemaRef.Context)NamedDecl*[Chaining.size()]; in InjectAnonymousStructOrUnionMembers()
2887 IndirectFieldDecl::Create(SemaRef.Context, Owner, VD->getLocation(), in InjectAnonymousStructOrUnionMembers()
2893 SemaRef.PushOnScopeChains(IndirectField, S); in InjectAnonymousStructOrUnionMembers()
4804 Sema &SemaRef, LookupResult &Previous, FunctionDecl *NewFD, in DiagnoseInvalidRedeclaration() argument
4809 LookupResult Prev(SemaRef, Name, NewFD->getLocation(), in DiagnoseInvalidRedeclaration()
4814 bool isFriendDecl = (SemaRef.getLangOpts().CPlusPlus && in DiagnoseInvalidRedeclaration()
4820 SemaRef.LookupQualifiedName(Prev, NewDC); in DiagnoseInvalidRedeclaration()
4824 DifferentNameValidatorCCC Validator(SemaRef.Context, NewFD, in DiagnoseInvalidRedeclaration()
4831 hasSimilarParameters(SemaRef.Context, FD, NewFD, MismatchedParams)) { in DiagnoseInvalidRedeclaration()
4840 } else if ((Correction = SemaRef.CorrectTypo(Prev.getLookupNameInfo(), in DiagnoseInvalidRedeclaration()
4844 Sema::SFINAETrap Trap(SemaRef); in DiagnoseInvalidRedeclaration()
4856 hasSimilarParameters(SemaRef.Context, FD, NewFD, MismatchedParams)) { in DiagnoseInvalidRedeclaration()
4864 Result = SemaRef.ActOnFunctionDeclarator( in DiagnoseInvalidRedeclaration()
4899 SemaRef.Diag(NewFD->getLocStart(), DiagMsg) in DiagnoseInvalidRedeclaration()
4900 << Name << NewDC << Correction.getQuoted(SemaRef.getLangOpts()) in DiagnoseInvalidRedeclaration()
4902 FixItLoc, Correction.getAsString(SemaRef.getLangOpts())); in DiagnoseInvalidRedeclaration()
4904 SemaRef.Diag(NewFD->getLocation(), DiagMsg) in DiagnoseInvalidRedeclaration()
4924 SemaRef.Diag(Loc, diag::note_member_def_close_param_match) in DiagnoseInvalidRedeclaration()
4927 SemaRef.Diag(FD->getLocation(), diag::note_previous_decl) in DiagnoseInvalidRedeclaration()
4928 << Correction.getQuoted(SemaRef.getLangOpts()); in DiagnoseInvalidRedeclaration()
4930 SemaRef.Diag(FD->getLocation(), diag::note_member_def_close_const_match) in DiagnoseInvalidRedeclaration()
4933 SemaRef.Diag(FD->getLocation(), diag::note_member_def_close_match); in DiagnoseInvalidRedeclaration()
4938 static FunctionDecl::StorageClass getFunctionStorageClass(Sema &SemaRef, in getFunctionStorageClass() argument
4945 SemaRef.Diag(D.getDeclSpec().getStorageClassSpecLoc(), in getFunctionStorageClass()
4952 if (SemaRef.CurContext->getRedeclContext()->isFunctionOrMethod()) { in getFunctionStorageClass()
4958 SemaRef.Diag(D.getDeclSpec().getStorageClassSpecLoc(), in getFunctionStorageClass()
4971 static FunctionDecl* CreateNewFunctionDecl(Sema &SemaRef, Declarator &D, in CreateNewFunctionDecl() argument
4976 DeclarationNameInfo NameInfo = SemaRef.GetNameForDeclarator(D); in CreateNewFunctionDecl()
4985 if (!SemaRef.getLangOpts().CPlusPlus) { in CreateNewFunctionDecl()
4995 NewFD = FunctionDecl::Create(SemaRef.Context, DC, in CreateNewFunctionDecl()
5003 NewFD->setLexicalDeclContext(SemaRef.CurContext); in CreateNewFunctionDecl()
5015 SemaRef.RequireNonAbstractType(D.getIdentifierLoc(), in CreateNewFunctionDecl()
5018 SemaRef.AbstractReturnType)) in CreateNewFunctionDecl()
5026 R = SemaRef.CheckConstructorDeclarator(D, R, SC); in CreateNewFunctionDecl()
5027 return CXXConstructorDecl::Create(SemaRef.Context, cast<CXXRecordDecl>(DC), in CreateNewFunctionDecl()
5036 R = SemaRef.CheckDestructorDeclarator(D, R, SC); in CreateNewFunctionDecl()
5039 SemaRef.Context, Record, in CreateNewFunctionDecl()
5047 if (SemaRef.getLangOpts().CPlusPlus0x && !Record->isDependentType() && in CreateNewFunctionDecl()
5050 SemaRef.AdjustDestructorExceptionSpec(Record, NewDD); in CreateNewFunctionDecl()
5057 SemaRef.Diag(D.getIdentifierLoc(), diag::err_destructor_not_member); in CreateNewFunctionDecl()
5062 return FunctionDecl::Create(SemaRef.Context, DC, in CreateNewFunctionDecl()
5071 SemaRef.Diag(D.getIdentifierLoc(), in CreateNewFunctionDecl()
5076 SemaRef.CheckConversionDeclarator(D, R, SC); in CreateNewFunctionDecl()
5078 return CXXConversionDecl::Create(SemaRef.Context, cast<CXXRecordDecl>(DC), in CreateNewFunctionDecl()
5090 SemaRef.Diag(D.getIdentifierLoc(), diag::err_constructor_return_type) in CreateNewFunctionDecl()
5114 return CXXMethodDecl::Create(SemaRef.Context, cast<CXXRecordDecl>(DC), in CreateNewFunctionDecl()
5123 return FunctionDecl::Create(SemaRef.Context, DC, in CreateNewFunctionDecl()