Lines Matching refs:getLangOpts
124 return getLangOpts().CPlusPlus; in isSimpleTypeSpecifier()
325 if (Result.empty() && getLangOpts().MSVCCompat && (!SS || SS->isEmpty())) { in getTypeName()
356 !(getLangOpts().CPlusPlus && NewSSPtr && in getTypeName()
500 assert(getLangOpts().MSVCCompat && "shouldn't be called in non-MSVC mode"); in ActOnMSVCUnknownTypeName()
625 std::string CorrectedStr(Corrected.getAsString(getLangOpts())); in DiagnoseUnknownTypeName()
648 if (getLangOpts().CPlusPlus) { in DiagnoseUnknownTypeName()
678 if (getLangOpts().MSVCCompat && isMicrosoftMissingTypename(SS, S)) in DiagnoseUnknownTypeName()
696 bool CheckTemplate = R.getSema().getLangOpts().CPlusPlus && in isResultTypeOrTemplate()
742 << Name << TagName << SemaRef.getLangOpts().CPlusPlus in isTagTypeWithMissingTag()
792 if (Result.empty() && SS.isEmpty() && getLangOpts().MSVCCompat) { in ClassifyName()
819 if (getLangOpts().CPlusPlus) in ClassifyName()
844 if (!getLangOpts().CPlusPlus && !SecondTry && in ClassifyName()
862 if (getLangOpts().CPlusPlus && NextToken.is(tok::less) && in ClassifyName()
877 std::string CorrectedStr(Corrected.getAsString(getLangOpts())); in ClassifyName()
943 if (getLangOpts().CPlusPlus && NextToken.is(tok::less) && in ClassifyName()
967 if (getLangOpts().CPlusPlus && NextToken.is(tok::less) && in ClassifyName()
1233 if (Context.getLangOpts().CPlusPlus) in AllowOverloadingOfFunction()
1259 if (getLangOpts().CPlusPlus && D->isOutOfLine() && in PushOnScopeChains()
1572 tok::colon, Ctx.getSourceManager(), Ctx.getLangOpts(), true); in GenerateFixForUnusedDecl()
1739 (S->isClassScope() && !getLangOpts().CPlusPlus)) in getNonFieldDeclScope()
1808 if (getLangOpts().CPlusPlus) { in LazilyCreateBuiltin()
1862 if (!S.getLangOpts().Modules && !S.getLangOpts().ModulesLocalVisibility) in filterNonConflictingPreviousTypedefDecls()
1886 if (S.getLangOpts().CPlusPlus && in filterNonConflictingPreviousTypedefDecls()
1945 if (getLangOpts().ObjC1) { in MergeTypedefNameDecl()
2005 if (getLangOpts().CPlusPlus && OldTag && NewTag && in MergeTypedefNameDecl()
2047 if (getLangOpts().MicrosoftExt) in MergeTypedefNameDecl()
2050 if (getLangOpts().CPlusPlus) { in MergeTypedefNameDecl()
2089 if (getLangOpts().Modules || getLangOpts().C11) in MergeTypedefNameDecl()
2783 !canRedefineFunction(Old, getLangOpts())) { in MergeFunctionDecl()
2784 if (getLangOpts().MicrosoftExt) { in MergeFunctionDecl()
2894 !getLangOpts().GNUInline && in MergeFunctionDecl()
2917 if (getLangOpts().CPlusPlus) { in MergeFunctionDecl()
3119 if (!getLangOpts().CPlusPlus && in MergeFunctionDecl()
3165 if (!getLangOpts().CPlusPlus && in MergeFunctionDecl()
3286 if (getLangOpts().CPlusPlus) in MergeCompatibleFunctionDecls()
3350 if (getLangOpts().CPlusPlus) { in MergeVarDeclTypes()
3444 if (S.getLangOpts().CPlusPlus) { in mergeTypeWithPrevious()
3567 if (getLangOpts().MicrosoftExt) { in MergeVarDecl()
3661 if (getLangOpts().CPlusPlus && in MergeVarDecl()
3733 if (!Context.getLangOpts().CPlusPlus) in handleTagNumbering()
3745 Tag, getMSManglingNumber(getLangOpts(), TagScope))); in handleTagNumbering()
3755 Tag, getMSManglingNumber(getLangOpts(), TagScope))); in handleTagNumbering()
3774 if (getLangOpts().CPlusPlus) in setTagNameForLinkagePurposes()
3867 << getLangOpts().CPlusPlus1z; in ParsedFreeStandingDeclSpec()
3925 if (getLangOpts().CPlusPlus || in ParsedFreeStandingDeclSpec()
3950 if (!getLangOpts().CPlusPlus && CurContext->isRecord() && in ParsedFreeStandingDeclSpec()
3970 if (Record && getLangOpts().MicrosoftExt) { in ParsedFreeStandingDeclSpec()
3985 if (getLangOpts().CPlusPlus && in ParsedFreeStandingDeclSpec()
4033 if (getLangOpts().CPlusPlus) in ParsedFreeStandingDeclSpec()
4254 if (Record->isUnion() && !getLangOpts().CPlusPlus && !getLangOpts().C11) in BuildAnonymousStructOrUnion()
4256 else if (!Record->isUnion() && getLangOpts().CPlusPlus) in BuildAnonymousStructOrUnion()
4258 else if (!Record->isUnion() && !getLangOpts().C11) in BuildAnonymousStructOrUnion()
4264 if (getLangOpts().CPlusPlus) { in BuildAnonymousStructOrUnion()
4362 if (getLangOpts().MicrosoftExt) in BuildAnonymousStructOrUnion()
4395 if (getLangOpts().MicrosoftExt && in BuildAnonymousStructOrUnion()
4417 << getLangOpts().CPlusPlus; in BuildAnonymousStructOrUnion()
4438 if (getLangOpts().CPlusPlus) in BuildAnonymousStructOrUnion()
4483 if (getLangOpts().CPlusPlus && NewVD->isStaticLocal()) { in BuildAnonymousStructOrUnion()
4489 NewVD, getMSManglingNumber(getLangOpts(), S))); in BuildAnonymousStructOrUnion()
5091 if (getLangOpts().CPlusPlus) in HandleDeclarator()
5275 if (!getLangOpts().CPlusPlus && in RegisterLocallyScopedExternCDecl()
5325 << getLangOpts().CPlusPlus1z; in ActOnTypedefDeclarator()
5450 if (Context.getLangOpts().CPlusPlus) { in isOutOfScopePreviousDeclaration()
5714 if (S.getLangOpts().CPlusPlus && !FD->hasAttr<GNUInlineAttr>()) in isFunctionDefinitionDiscarded()
5755 if (S.getLangOpts().CPlusPlus) { in isIncompleteDeclExternC()
5761 if (S.getLangOpts().CUDA && (D->template hasAttr<CUDADeviceAttr>() || in isIncompleteDeclExternC()
5859 if (getLangOpts().OpenCL && (R->isImageType() || R->isPipeType())) { in ActOnVariableDeclarator()
5881 if (getLangOpts().OpenCL) { in ActOnVariableDeclarator()
5911 if (getLangOpts().CPlusPlus11 && SCSpec == DeclSpec::SCS_register && in ActOnVariableDeclarator()
5918 getLangOpts().CPlusPlus1z ? diag::ext_register_storage_class in ActOnVariableDeclarator()
5942 if (getLangOpts().OpenCL) { in ActOnVariableDeclarator()
5975 if (!getLangOpts().CPlusPlus) { in ActOnVariableDeclarator()
6026 getLangOpts().CPlusPlus11 in ActOnVariableDeclarator()
6075 getLangOpts().CPlusPlus14 in ActOnVariableDeclarator()
6135 if (NewVD->isStaticDataMember() && getLangOpts().CPlusPlus1z) in ActOnVariableDeclarator()
6188 getLangOpts().CPlusPlus1z ? diag::warn_cxx14_compat_inline_variable in ActOnVariableDeclarator()
6219 if (getLangOpts().CUDA) { in ActOnVariableDeclarator()
6279 if (getLangOpts().CUDA) { in ActOnVariableDeclarator()
6280 if (EmitTLSUnsupportedError && DeclAttrsMatchCUDAMode(getLangOpts(), NewVD)) in ActOnVariableDeclarator()
6301 if (getLangOpts().ObjCAutoRefCount && inferObjCARCLifetime(NewVD)) in ActOnVariableDeclarator()
6318 DeclAttrsMatchCUDAMode(getLangOpts(), getCurFunctionDecl())) in ActOnVariableDeclarator()
6328 if (DeclAttrsMatchCUDAMode(getLangOpts(), NewVD)) { in ActOnVariableDeclarator()
6377 if (getLangOpts().CPlusPlus && in ActOnVariableDeclarator()
6383 if (!getLangOpts().CPlusPlus) { in ActOnVariableDeclarator()
6468 if (getLangOpts().CPlusPlus && NewVD->isStaticLocal()) { in ActOnVariableDeclarator()
6474 NewVD, getMSManglingNumber(getLangOpts(), S))); in ActOnVariableDeclarator()
6482 !getLangOpts().Freestanding && !NewVD->getDescribedVarTemplate()) { in ActOnVariableDeclarator()
6486 if (getLangOpts().CPlusPlus) in ActOnVariableDeclarator()
6620 if (!getLangOpts().CPlusPlus || ShadowingDecls.empty()) in CheckShadowingDeclModification()
6645 assert(S.getLangOpts().CPlusPlus && "only C++ has extern \"C\""); in checkGlobalOrExternCConflict()
6728 if (!S.getLangOpts().CPlusPlus) { in checkForConflictWithNonVisibleExternC()
6783 if (!getLangOpts().OpenCL in CheckVariableDeclarationType()
6792 if (getLangOpts().OpenCLVersion == 120 && in CheckVariableDeclarationType()
6800 if (getLangOpts().OpenCL) { in CheckVariableDeclarationType()
6843 getLangOpts().OpenCLVersion == 200))) { in CheckVariableDeclarationType()
6845 if (getLangOpts().OpenCLVersion == 200) in CheckVariableDeclarationType()
6882 if (getLangOpts().getGC() != LangOptions::NonGC) in CheckVariableDeclarationType()
6885 assert(!getLangOpts().ObjCAutoRefCount); in CheckVariableDeclarationType()
6938 if (NewVD->isThisDeclarationADefinition() || getLangOpts().CPlusPlus) { in CheckVariableDeclarationType()
7346 if (!SemaRef.getLangOpts().CPlusPlus) { in CreateNewFunctionDecl()
7404 if (SemaRef.getLangOpts().CPlusPlus11 && !Record->isDependentType() && in CreateNewFunctionDecl()
7463 SemaRef.getLangOpts().CPlusPlus && D.getDeclSpec().isFriendSpecified(); in CreateNewFunctionDecl()
7709 if (getLangOpts().CPlusPlus) { in ActOnFunctionDeclarator()
7858 if (getLangOpts().CPlusPlus14 && in ActOnFunctionDeclarator()
7863 if (getLangOpts().CPlusPlus14 && in ActOnFunctionDeclarator()
8077 getLangOpts().CPlusPlus11 && FPT && !FPT->hasExceptionSpec()) in ActOnFunctionDeclarator()
8194 if (getLangOpts().CUDA) in ActOnFunctionDeclarator()
8197 if (getLangOpts().OpenCL) { in ActOnFunctionDeclarator()
8210 if (!getLangOpts().CPlusPlus) { in ActOnFunctionDeclarator()
8318 Diag(NewFD->getLocation(), getLangOpts().MicrosoftExt ? in ActOnFunctionDeclarator()
8533 if (getLangOpts().CUDA) { in ActOnFunctionDeclarator()
8546 if (!getLangOpts().CUDAAllowVariadicFunctions && NewFD->isVariadic() && in ActOnFunctionDeclarator()
8555 if (getLangOpts().CPlusPlus) { in ActOnFunctionDeclarator()
8565 if ((getLangOpts().OpenCLVersion >= 120) in ActOnFunctionDeclarator()
8589 if (getLangOpts().OpenCLVersion >= 200) { in ActOnFunctionDeclarator()
8643 bool MergeTypeWithPrevious = !getLangOpts().CPlusPlus && in CheckFunctionDeclaration()
8678 if (!getLangOpts().CPlusPlus && !NewFD->hasAttr<OverloadableAttr>()) { in CheckFunctionDeclaration()
8708 if (!getLangOpts().CPlusPlus && !NewFD->hasAttr<OverloadableAttr>()) { in CheckFunctionDeclaration()
8733 if (!getLangOpts().CPlusPlus14 && MD && MD->isConstexpr() && in CheckFunctionDeclaration()
8811 if (getLangOpts().CPlusPlus) { in CheckFunctionDeclaration()
8913 Diag(DS.getStorageClassSpecLoc(), getLangOpts().CPlusPlus in CheckMain()
8932 if (getLangOpts().OpenCL) { in CheckMain()
8943 if (getLangOpts().GNUMode && !getLangOpts().CPlusPlus) { in CheckMain()
9468 if (getLangOpts().DebuggerCastResultToId && in deduceVarTypeFromInitializer()
9563 if (getLangOpts().ObjCAutoRefCount && inferObjCARCLifetime(VDecl)) in AddInitializerToDecl()
9633 if (getLangOpts().CPlusPlus) { in AddInitializerToDecl()
9678 if (getLangOpts().DebuggerCastResultToId && DclT->isObjCObjectPointerType() && in AddInitializerToDecl()
9796 if (!getLangOpts().CPlusPlus && !VDecl->isInvalidDecl()) { in AddInitializerToDecl()
9804 else if (!getLangOpts().C99 && VDecl->getType()->isAggregateType() && in AddInitializerToDecl()
9852 if (getLangOpts().CPlusPlus11 && DclT.isVolatileQualified()) in AddInitializerToDecl()
9877 if (getLangOpts().CPlusPlus11) { in AddInitializerToDecl()
9896 } else if (getLangOpts().CPlusPlus11 && DclT->isLiteralType(Context)) { in AddInitializerToDecl()
9909 (!getLangOpts().CPlusPlus || in AddInitializerToDecl()
9916 if (!getLangOpts().CPlusPlus && !VDecl->isInvalidDecl()) in AddInitializerToDecl()
10012 if (!getLangOpts().CPlusPlus1z) { in ActOnUninitializedDecl()
10175 if (getLangOpts().CPlusPlus && Var->hasLocalStorage()) { in ActOnUninitializedDecl()
10295 if (getLangOpts().OpenCL) { in CheckCompleteVariableDeclaration()
10309 if (getLangOpts().ObjC1 && in CheckCompleteVariableDeclaration()
10350 if (getLangOpts().CPlusPlus11) in CheckCompleteVariableDeclaration()
10352 } else if (getLangOpts().CPlusPlus && var->hasInit() && in CheckCompleteVariableDeclaration()
10361 if (getLangOpts().CPlusPlus11) in CheckCompleteVariableDeclaration()
10399 if (!getLangOpts().CPlusPlus) return; in CheckCompleteVariableDeclaration()
10526 if (getLangOpts().CUDA && getLangOpts().CUDAIsDevice && in FinalizeDeclaration()
10540 if (getLangOpts().CUDA && getLangOpts().CUDAIsDevice) { in FinalizeDeclaration()
10686 getLangOpts().CPlusPlus) in FinalizeDeclaratorGroup()
10801 } else if (getLangOpts().CPlusPlus && in ActOnParamDeclarator()
10815 << getLangOpts().CPlusPlus1z; in ActOnParamDeclarator()
10827 if (getLangOpts().CPlusPlus) { in ActOnParamDeclarator()
10973 if (getLangOpts().ObjCAutoRefCount && in CheckParameter()
11026 if (!(getLangOpts().OpenCL && T->isArrayType())) { in CheckParameter()
11154 if (canRedefineFunction(Definition, getLangOpts())) in CheckForFunctionRedefinition()
11173 if (getLangOpts().GNUMode && Definition->isInlineSpecified() && in CheckForFunctionRedefinition()
11176 << FD->getDeclName() << getLangOpts().CPlusPlus; in CheckForFunctionRedefinition()
11445 if (getLangOpts().Coroutines && !getCurFunction()->CoroutineStmts.empty()) in ActOnFinishFunctionBody()
11451 if (getLangOpts().CPlusPlus14) { in ActOnFinishFunctionBody()
11468 } else if (getLangOpts().CPlusPlus11 && isLambdaCallOperator(FD)) { in ActOnFinishFunctionBody()
11508 if (getLangOpts().MicrosoftExt && FD->isPure() && FD->isCanonicalDecl()) in ActOnFinishFunctionBody()
11527 if (getLangOpts().CPlusPlus && FD->getReturnType()->isRecordType() && in ActOnFinishFunctionBody()
11745 else if (getLangOpts().C99) in ImplicitlyDefineFunction()
11861 if (!getLangOpts().MathErrno && in AddKnownFunctionAttributes()
11877 if (getLangOpts().CUDA && Context.BuiltinInfo.isTSBuiltin(BuiltinID) && in AddKnownFunctionAttributes()
11882 if (getLangOpts().CUDAIsDevice != in AddKnownFunctionAttributes()
11893 if (getLangOpts().CXXExceptions && getLangOpts().ExternCNoUnwind && in AddKnownFunctionAttributes()
11903 if ((!getLangOpts().CPlusPlus && in AddKnownFunctionAttributes()
12218 if (S.getLangOpts().MSVCCompat && in isAcceptableTagRedeclContext()
12349 if (getLangOpts().MSVCCompat || TUK == TUK_Definition) { in ActOnTag()
12474 if (getLangOpts().MSVCCompat) in ActOnTag()
12495 if (!getLangOpts().CPlusPlus && TUK != TUK_Reference) { in ActOnTag()
12513 if (getLangOpts().CPlusPlus && Name && DC && StdNamespace && in ActOnTag()
12567 S = getTagInjectionScope(S, getLangOpts()); in ActOnTag()
12583 if (getLangOpts().CPlusPlus) { in ActOnTag()
12609 if (getLangOpts().CPlusPlus) { in ActOnTag()
12743 S = getTagInjectionScope(S, getLangOpts()); in ActOnTag()
12768 if (SkipBody && getLangOpts().CPlusPlus && in ActOnTag()
12781 if (!getLangOpts().CPlusPlus && S->containedInPrototypeScope()) in ActOnTag()
12917 if ((getLangOpts().CPlusPlus11 || getLangOpts().ObjC2) && in ActOnTag()
12928 if (getLangOpts().MSVCCompat) in ActOnTag()
12930 else if (getLangOpts().CPlusPlus) in ActOnTag()
12955 if (getLangOpts().CPlusPlus) { in ActOnTag()
12969 if (getLangOpts().CPlusPlus && IsTypeSpecifier && TUK == TUK_Definition) { in ActOnTag()
13035 if (getLangOpts().CPlusPlus) { in ActOnTag()
13064 New->setObjectOfFriendDecl(getLangOpts().MSVCCompat); in ActOnTag()
13111 return (Invalid && getLangOpts().CPlusPlus) ? nullptr : New; in ActOnTag()
13295 BitfieldIsOverwide && !getLangOpts().CPlusPlus; in VerifyBitField()
13352 if (getLangOpts().CPlusPlus) { in HandleField()
13381 << getLangOpts().CPlusPlus1z; in HandleField()
13488 if (BitWidth && getLangOpts().OpenCL) { in CheckFieldDecl()
13543 DiagID = getLangOpts().MSVCCompat ? diag::ext_mutable_reference in CheckFieldDecl()
13577 if (!InvalidDecl && getLangOpts().CPlusPlus) { in CheckFieldDecl()
13596 Diag(NewFD->getLocation(), getLangOpts().MicrosoftExt ? in CheckFieldDecl()
13600 if (!getLangOpts().MicrosoftExt) in CheckFieldDecl()
13618 if (getLangOpts().ObjCAutoRefCount && inferObjCARCLifetime(NewFD)) in CheckFieldDecl()
13630 assert(getLangOpts().CPlusPlus && "valid check only for C++"); in CheckNontrivialField()
13659 if (!getLangOpts().CPlusPlus11 && in CheckNontrivialField()
13660 getLangOpts().ObjCAutoRefCount && RDecl->hasObjectMember()) { in CheckNontrivialField()
13675 Diag(FD->getLocation(), getLangOpts().CPlusPlus11 ? in CheckNontrivialField()
13680 return !getLangOpts().CPlusPlus11; in CheckNontrivialField()
13793 if (getLangOpts().ObjCAutoRefCount && inferObjCARCLifetime(NewID)) in ActOnIvar()
13928 ((getLangOpts().MicrosoftExt || in ActOnFields()
13929 getLangOpts().CPlusPlus) && in ActOnFields()
13937 DiagID = getLangOpts().MicrosoftExt in ActOnFields()
13939 : getLangOpts().CPlusPlus in ActOnFields()
13943 DiagID = getLangOpts().MicrosoftExt in ActOnFields()
13945 : getLangOpts().CPlusPlus in ActOnFields()
13961 if (!getLangOpts().C99) in ActOnFields()
14024 } else if (getLangOpts().ObjCAutoRefCount && Record && !ARCErrReported && in ActOnFields()
14025 (!getLangOpts().CPlusPlus || Record->isUnion())) { in ActOnFields()
14046 } else if (getLangOpts().ObjC1 && in ActOnFields()
14047 getLangOpts().getGC() != LangOptions::NonGC && in ActOnFields()
14084 if (getLangOpts().CPlusPlus11) in ActOnFields()
14152 if (!getLangOpts().CPlusPlus) { in ActOnFields()
14186 Diag(RecLoc, getLangOpts().CPlusPlus ? in ActOnFields()
14194 if (NonBitFields == 0 && !getLangOpts().CPlusPlus) { in ActOnFields()
14325 if (getLangOpts().CPlusPlus11 && Enum->isFixed() && in CheckEnumConstant()
14326 !getLangOpts().MSVCCompat) { in CheckEnumConstant()
14351 if (getLangOpts().MSVCCompat) { in CheckEnumConstant()
14361 } else if (getLangOpts().CPlusPlus) { in CheckEnumConstant()
14457 if (!getLangOpts().CPlusPlus && !T.isNull()) in CheckEnumConstant()
14459 } else if (!getLangOpts().CPlusPlus && in CheckEnumConstant()
14481 if (!(getLangOpts().Modules || getLangOpts().ModulesLocalVisibility) || in shouldSkipAnonEnumBody()
14482 !getLangOpts().CPlusPlus) in shouldSkipAnonEnumBody()
14545 assert((getLangOpts().CPlusPlus || !isa<TagDecl>(PrevDecl)) && in ActOnEnumConstant()
14907 = (NumPositiveBits == BestWidth || !getLangOpts().CPlusPlus) in ActOnEnumBody()
14913 = (NumPositiveBits == BestWidth || !getLangOpts().CPlusPlus) in ActOnEnumBody()
14921 = (NumPositiveBits == BestWidth || !getLangOpts().CPlusPlus) in ActOnEnumBody()
14946 if (!getLangOpts().CPlusPlus && in ActOnEnumBody()
14954 if (getLangOpts().CPlusPlus) in ActOnEnumBody()
14979 if (getLangOpts().CPlusPlus) in ActOnEnumBody()
15077 if (Mod->getTopLevelModuleName() == getLangOpts().CurrentModule) in ActOnModuleImport()
15078 Diag(ImportLoc, getLangOpts().CompilingModule in ActOnModuleImport()
15081 << Mod->getFullModuleName() << getLangOpts().CurrentModule; in ActOnModuleImport()
15119 (getLangOpts().CompilingModule || in ActOnModuleInclude()
15120 getLangOpts().CurrentModule.empty() || in ActOnModuleInclude()
15121 getLangOpts().CurrentModule != Mod->getTopLevelModuleName()); in ActOnModuleInclude()
15141 if (getLangOpts().ModulesLocalVisibility) in ActOnModuleBegin()
15149 if (getLangOpts().ModulesLocalVisibility) { in ActOnModuleEnd()
15162 if (isSFINAEContext() || !getLangOpts().ModulesErrorRecovery) in createImplicitModuleImportForErrorRecovery()