| /llvm-project-15.0.7/clang/unittests/Frontend/ |
| H A D | CompilerInvocationTest.cpp | 532 ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsHost); in TEST_F() 548 ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsHost); in TEST_F() 565 ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsHost); in TEST_F() 719 ASSERT_TRUE(Invocation.getLangOpts()->AllowRecip); in TEST_F() 739 ASSERT_TRUE(Invocation.getLangOpts()->AllowRecip); in TEST_F() 759 ASSERT_TRUE(Invocation.getLangOpts()->AllowRecip); in TEST_F() 805 ASSERT_TRUE(Invocation.getLangOpts()->Digraphs); in TEST_F() 816 ASSERT_FALSE(Invocation.getLangOpts()->Digraphs); in TEST_F() 827 ASSERT_FALSE(Invocation.getLangOpts()->Digraphs); in TEST_F() 838 ASSERT_TRUE(Invocation.getLangOpts()->Digraphs); in TEST_F() [all …]
|
| /llvm-project-15.0.7/clang/lib/Sema/ |
| H A D | SemaModule.cpp | 80 assert(getLangOpts().CPlusPlusModules && getLangOpts().ModulesTS && in ActOnGlobalModuleFragmentDecl() 108 assert(getLangOpts().CPlusPlusModules && in HandleStartOfHeaderUnit() 151 assert((getLangOpts().ModulesTS || getLangOpts().CPlusPlusModules) && in ActOnModuleDecl() 224 assert((!getLangOpts().CPlusPlusModules || getLangOpts().ModulesTS || in ActOnModuleDecl() 252 if (!getLangOpts().CurrentModule.empty() && in ActOnModuleDecl() 258 << getLangOpts().CurrentModule; in ActOnModuleDecl() 320 if (getLangOpts().ModulesLocalVisibility) in ActOnModuleDecl() 431 bool Cxx20Mode = getLangOpts().CPlusPlusModules || getLangOpts().ModulesTS; in ActOnModuleImport() 499 (getLangOpts().isCompilingModule() || !getLangOpts().ModulesTS)) { in ActOnModuleImport() 613 if (getLangOpts().isCompilingModule()) { in BuildModuleInclude() [all …]
|
| H A D | SemaCUDA.cpp | 38 assert(getLangOpts().CUDA && "Should only be called during CUDA compilation"); in PushForceCUDAHostDevice() 43 assert(getLangOpts().CUDA && "Should only be called during CUDA compilation"); in PopForceCUDAHostDevice() 237 if ((getLangOpts().CUDAIsDevice && CalleeTarget == CFT_Device) || in IdentifyCUDAPreference() 238 (!getLangOpts().CUDAIsDevice && in IdentifyCUDAPreference() 663 assert(getLangOpts().CUDA && "Should only be called during CUDA compilation"); in maybeAddCUDAHostDeviceAttrs() 673 if (!getLangOpts().CUDAHostDeviceConstexpr || !NewD->isConstexpr() || in maybeAddCUDAHostDeviceAttrs() 716 if (getLangOpts().CUDAIsDevice && !VD->hasAttr<CUDAConstantAttr>() && in MaybeAddCUDAConstantAttr() 742 if (!getLangOpts().CUDAIsDevice) in CUDADiagIfDeviceCode() 771 if (getLangOpts().CUDAIsDevice) in CUDADiagIfHostCode() 953 if (getLangOpts().HIP) in getCudaConfigureFuncName() [all …]
|
| H A D | Sema.cpp | 189 CurFPFeatures(pp.getLangOpts()), LangOpts(pp.getLangOpts()), PP(pp), in Sema() 229 if (getLangOpts().ObjC) in Sema() 232 if (getLangOpts().CPlusPlus) in Sema() 299 if (getLangOpts().ObjC) { in Initialize() 329 if (getLangOpts().MSVCCompat) { in Initialize() 330 if (getLangOpts().CPlusPlus && in Initialize() 340 if (getLangOpts().OpenCL) { in Initialize() 347 if (getLangOpts().OpenCLCPlusPlus || getLangOpts().Blocks) { in Initialize() 590 if (!getLangOpts().CPlusPlus11) in diagnoseZeroToNullptrConversion() 1460 if (getLangOpts().OpenCL) in getDefaultCXXMethodAddrSpace() [all …]
|
| H A D | SemaDecl.cpp | 2410 if (!S.getLangOpts().Modules && !S.getLangOpts().ModulesLocalVisibility) in filterNonConflictingPreviousTypedefDecls() 2636 if (getLangOpts().Modules || getLangOpts().C11) in MergeTypedefNameDecl() 5407 if (Record->isUnion() && !getLangOpts().CPlusPlus && !getLangOpts().C11) in BuildAnonymousStructOrUnion() 7607 if (getLangOpts().CUDA || getLangOpts().OpenMPIsDevice || in ActOnVariableDeclarator() 7724 if (getLangOpts().CUDA || getLangOpts().OpenMPIsDevice || in ActOnVariableDeclarator() 7727 ((getLangOpts().CUDA && DeclAttrsMatchCUDAMode(getLangOpts(), NewVD)) || in ActOnVariableDeclarator() 11657 if (getLangOpts().HLSL) in CheckMain() 11671 if (getLangOpts().GNUMode && !getLangOpts().CPlusPlus) { in CheckMain() 13914 if (getLangOpts().CUDA) in FinalizeDeclaration() 15758 if (getLangOpts().CXXExceptions && getLangOpts().ExternCNoUnwind && in AddKnownFunctionAttributes() [all …]
|
| H A D | SemaType.cpp | 1487 !(S.getLangOpts().SYCLIsDevice || S.getLangOpts().CUDAIsDevice || in ConvertDeclSpecToType() 1488 (S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsDevice))) in ConvertDeclSpecToType() 1501 !(S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsDevice)) in ConvertDeclSpecToType() 1533 !(S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsDevice)) in ConvertDeclSpecToType() 1541 !(S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsDevice)) in ConvertDeclSpecToType() 1863 if (!S.getLangOpts().C99 && !S.getLangOpts().CPlusPlus in ConvertDeclSpecToType() 2587 targetDiag(Loc, (getLangOpts().CUDA && getLangOpts().CUDAIsDevice) in BuildArrayType() 2590 << ((getLangOpts().CUDA && getLangOpts().CUDAIsDevice) in BuildArrayType() 2692 bool IsNoBoolVecLang = getLangOpts().OpenCL || getLangOpts().OpenCLCPlusPlus; in BuildExtVectorType() 8043 S.getLangOpts().VScaleMin != S.getLangOpts().VScaleMax) { in HandleArmSveVectorBitsTypeAttr() [all …]
|
| /llvm-project-15.0.7/clang/lib/Frontend/ |
| H A D | FrontendAction.cpp | 479 if (CI.getLangOpts().CurrentModule.empty()) { in prepareToBuildModule() 553 CI.getLangOpts(), FileMgr, CI.getDiagnostics(), in getInputBufferForModule() 619 CI.getLangOpts() = AST->getLangOpts(); in BeginSourceFile() 836 if (CI.getLangOpts().ModuleName.empty()) in BeginSourceFile() 837 CI.getLangOpts().ModuleName = std::string(FileName); in BeginSourceFile() 838 CI.getLangOpts().CurrentModule = CI.getLangOpts().ModuleName; in BeginSourceFile() 854 if (CI.getLangOpts().ModuleName.empty()) in BeginSourceFile() 856 CI.getLangOpts().CurrentModule = CI.getLangOpts().ModuleName; in BeginSourceFile() 945 } else if (CI.getLangOpts().Modules || in BeginSourceFile() 991 if (CI.getLangOpts().Modules || !CI.hasASTContext() || in BeginSourceFile() [all …]
|
| H A D | FrontendActions.cpp | 181 CI.getLangOpts().CompilingPCH = true; in BeginSourceFileAction() 219 if (!CI.getLangOpts().Modules) { in BeginSourceFileAction() 239 HS.getCachedModuleFileName(CI.getLangOpts().CurrentModule, in CreateOutputFile() 252 if (!CI.getLangOpts().ModulesTS && !CI.getLangOpts().CPlusPlusModules) { in BeginSourceFileAction() 270 if (!CI.getLangOpts().Modules) { in PrepareToExecuteAction() 311 CI.getLangOpts().setCompilingModule(LangOptions::CMK_HeaderModule); in BeginSourceFileAction() 340 if (!CI.getLangOpts().CPlusPlusModules) { in BeginSourceFileAction() 344 CI.getLangOpts().setCompilingModule(LangOptions::CMK_HeaderUnit); in BeginSourceFileAction() 877 const LangOptions &LO = getCurrentASTUnit().getLangOpts(); in ExecuteAction() 968 Lexer RawLex(SM.getMainFileID(), FromFile, SM, PP.getLangOpts()); in ExecuteAction() [all …]
|
| /llvm-project-15.0.7/clang/tools/clang-import-test/ |
| H A D | clang-import-test.cpp | 181 Inv->getLangOpts()->CPlusPlus = true; in BuildCompilerInstance() 186 Inv->getLangOpts()->ObjC = 1; in BuildCompilerInstance() 191 Inv->getLangOpts()->Bool = true; in BuildCompilerInstance() 192 Inv->getLangOpts()->WChar = true; in BuildCompilerInstance() 193 Inv->getLangOpts()->Blocks = true; in BuildCompilerInstance() 195 Inv->getLangOpts()->SpellChecking = false; in BuildCompilerInstance() 197 Inv->getLangOpts()->AccessControl = false; in BuildCompilerInstance() 198 Inv->getLangOpts()->DollarIdents = true; in BuildCompilerInstance() 199 Inv->getLangOpts()->Exceptions = true; in BuildCompilerInstance() 200 Inv->getLangOpts()->CXXExceptions = true; in BuildCompilerInstance() [all …]
|
| /llvm-project-15.0.7/clang/lib/CodeGen/ |
| H A D | CGDeclCXX.cpp | 210 if (getLangOpts().OpenMP && !getLangOpts().OpenMPSimd && in EmitCXXGlobalVarDeclInit() 442 if (!getLangOpts().Exceptions) in CreateGlobalInitOrCleanUpFunction() 516 if (getLangOpts().CUDAIsDevice && !getLangOpts().GPUAllowDeviceInit && in EmitCXXGlobalVarDeclInitFunc() 521 if (getLangOpts().OpenMP && in EmitCXXGlobalVarDeclInitFunc() 730 if (getLangOpts().OpenCL) { in EmitCXXModuleInitFunc() 735 assert(!getLangOpts().CUDA || !getLangOpts().CUDAIsDevice || in EmitCXXModuleInitFunc() 737 if (getLangOpts().HIP && getLangOpts().CUDAIsDevice) { in EmitCXXModuleInitFunc() 878 if (getLangOpts().OpenCL) { in EmitCXXGlobalInitFunc() 883 assert(!getLangOpts().CUDA || !getLangOpts().CUDAIsDevice || in EmitCXXGlobalInitFunc() 885 if (getLangOpts().HIP && getLangOpts().CUDAIsDevice) { in EmitCXXGlobalInitFunc() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/ |
| H A D | BracesAroundStatementsCheck.cpp | 25 Lexer::GetBeginningOfToken(Loc, SM, Context->getLangOpts()); in getTokenKind() 27 Lexer::getRawToken(Beginning, Tok, SM, Context->getLangOpts()); in getTokenKind() 49 Loc = Lexer::getLocForEndOfToken(Loc, 0, SM, Context->getLangOpts()); in forwardSkipWhitespaceAndComments() 56 utils::lexer::getUnifiedEndLoc(S, SM, Context->getLangOpts()); in findEndLocation() 80 Lexer::getLocForEndOfToken(Loc, 0, SM, Context->getLangOpts()); in findEndLocation() 83 CharSourceRange::getTokenRange(TokRange), SM, Context->getLangOpts()); in findEndLocation() 171 Lexer::getLocForEndOfToken(CondEndLoc, 0, SM, Context->getLangOpts()); in findRParenLoc() 215 SM, Context->getLangOpts()) in checkStmt() 220 Lexer::getLocForEndOfToken(InitialLoc, 0, SM, Context->getLangOpts()); in checkStmt() 255 SM, Context->getLangOpts()) in checkStmt()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/cppcoreguidelines/ |
| H A D | PreferMemberInitializerCheck.cpp | 161 S->getBeginLoc(), *Result.SourceManager, getLangOpts()); in check() 181 if (IsUseDefaultMemberInitEnabled && getLangOpts().CPlusPlus11 && in check() 183 (getLangOpts().CPlusPlus20 || !Field->isBitField()) && in check() 192 *Result.SourceManager, getLangOpts()); in check() 196 S->getEndLoc(), *Result.SourceManager, getLangOpts())) in check() 213 *Result.SourceManager, getLangOpts()), in check() 261 getLangOpts()); in check() 271 0, *Result.SourceManager, getLangOpts()); in check() 285 S->getEndLoc(), *Result.SourceManager, getLangOpts())) in check() 298 *Result.SourceManager, getLangOpts()); in check()
|
| /llvm-project-15.0.7/clang/lib/ARCMigrate/ |
| H A D | ARCMT.cpp | 194 CInvok->getLangOpts()->ObjCAutoRefCount = true; in createInvocationForMigration() 195 CInvok->getLangOpts()->setGC(LangOptions::NonGC); in createInvocationForMigration() 210 CInvok->getLangOpts()->ObjCWeakRuntime = HasARCRuntime(origCI); in createInvocationForMigration() 211 CInvok->getLangOpts()->ObjCWeak = CInvok->getLangOpts()->ObjCWeakRuntime; in createInvocationForMigration() 226 printer.BeginSourceFile(PP.getLangOpts(), &PP); in emitPremigrationErrors() 240 if (!origCI.getLangOpts()->ObjC) in checkForManualIssues() 243 LangOptions::GCMode OrigGCMode = origCI.getLangOpts()->getGC(); in checkForManualIssues() 341 if (!origCI.getLangOpts()->ObjC) in applyTransforms() 375 origCI.getLangOpts()->ObjCAutoRefCount = true; in applyTransforms() 578 Rewriter rewriter(Ctx.getSourceManager(), Ctx.getLangOpts()); in applyTransform() [all …]
|
| /llvm-project-15.0.7/clang/lib/Lex/ |
| H A D | TokenConcatenation.cpp | 48 const LangOptions &LangOpts = PP.getLangOpts(); in IsIdentifierStringPrefix() 89 if (PP.getLangOpts().CPlusPlus11) { in TokenConcatenation() 102 if (PP.getLangOpts().CPlusPlus17) in TokenConcatenation() 106 if (PP.getLangOpts().CPlusPlus20) in TokenConcatenation() 231 if (!PP.getLangOpts().CPlusPlus11) in AvoidConcat() 270 (PP.getLangOpts().CPlusPlus && FirstChar == '*'); in AvoidConcat() 289 (PP.getLangOpts().CPlusPlus && FirstChar == ':'); in AvoidConcat() 293 return PP.getLangOpts().CPlusPlus && FirstChar == '*'; in AvoidConcat() 295 return PP.getLangOpts().CPlusPlus20 && FirstChar == '>'; in AvoidConcat()
|
| /llvm-project-15.0.7/clang/lib/Parse/ |
| H A D | ParseDecl.cpp | 927 if (!getLangOpts().ObjC) in ParseNullabilityTypeSpecifiers() 3833 if (!getLangOpts().C11) in ParseDeclarationSpecifiers() 3890 if (!getLangOpts().C11) in ParseDeclarationSpecifiers() 3897 if (!getLangOpts().C11) in ParseDeclarationSpecifiers() 3958 if (!getLangOpts().C99) in ParseDeclarationSpecifiers() 3964 if (!getLangOpts().C99) in ParseDeclarationSpecifiers() 4625 bool CanHaveEnumBase = (getLangOpts().CPlusPlus11 || getLangOpts().ObjC || in ParseEnumSpecifier() 4848 !getLangOpts().ObjC) { in ParseEnumSpecifier() 5051 if (!getLangOpts().C99 && !getLangOpts().CPlusPlus11) in ParseEnumBody() 6330 if (getLangOpts().ObjC && getLangOpts().CPlusPlus && in ParseDirectDeclarator() [all …]
|
| H A D | Parser.cpp | 45 if (!Ident__except && (getLangOpts().MicrosoftExt || getLangOpts().Borland)) in getSEHExceptKeyword() 482 if (getLangOpts().ObjC) { in Initialize() 510 if (getLangOpts().AltiVec || getLangOpts().ZVector) { in Initialize() 515 if (getLangOpts().AltiVec) in Initialize() 535 if(getLangOpts().Borland) { in Initialize() 599 !getLangOpts().CPlusPlus && !getLangOpts().IsHeaderFile) in ParseFirstTopLevelDecl() 900 if (!getLangOpts().ObjC) { in ParseExternalDeclaration() 928 if (getLangOpts().CPlusPlusModules || getLangOpts().ModulesTS) { in ParseExternalDeclaration() 1042 (getLangOpts().CPlusPlus && in isDeclarationAfterDeclarator() 2005 if (getLangOpts().CPlusPlus) in TryAnnotateTypeOrScopeToken() [all …]
|
| H A D | ParseInit.cpp | 37 if (!PP.getLangOpts().CPlusPlus11) in MayBeDesignationStart() 251 if (getLangOpts().ObjC && getLangOpts().CPlusPlus) { in ParseInitializerWithPotentialDesignator() 284 } else if (getLangOpts().ObjC && Tok.is(tok::identifier)) { in ParseInitializerWithPotentialDesignator() 354 if (getLangOpts().ObjC && Tok.isNot(tok::ellipsis) && in ParseInitializerWithPotentialDesignator() 402 if (Tok.is(tok::l_brace) && getLangOpts().CPlusPlus11) { in ParseInitializerWithPotentialDesignator() 451 if (!getLangOpts().CPlusPlus) in ParseBraceInitializer() 479 if (getLangOpts().MicrosoftExt && (Tok.is(tok::kw___if_exists) || in ParseBraceInitializer()
|
| H A D | ParseExpr.cpp | 453 if (getLangOpts().ObjC && getLangOpts().CPlusPlus && in ParseRHSOfBinaryExpression() 656 if (!getLangOpts().CPlusPlus) in ParseRHSOfBinaryExpression() 1046 if (getLangOpts().CPlusPlus) { in ParseCastExpression() 1198 if (getLangOpts().ObjC && in ParseCastExpression() 1414 if (!getLangOpts().C11) in ParseCastExpression() 1538 if (!getLangOpts().CPlusPlus) { in ParseCastExpression() 1744 if (getLangOpts().ObjC) { in ParseCastExpression() 1763 if (getLangOpts().ObjC) { in ParseCastExpression() 1820 if (getLangOpts().OpenCL && in ParseCastExpression() 3000 if (getLangOpts().OpenCL) in ParseParenExpression() [all …]
|
| H A D | ParseStmt.cpp | 111 if (getLangOpts().OpenCL) in ParseStatementOrDeclaration() 233 if ((getLangOpts().CPlusPlus || getLangOpts().MicrosoftExt || in ParseStatementOrDeclarationAfterAttributes() 595 if (getLangOpts().Borland) { in ParseSEHExceptBlock() 1447 bool C99orCXX = getLangOpts().C99 || getLangOpts().CPlusPlus; in ParseIfStatement() 1644 bool C99orCXX = getLangOpts().C99 || getLangOpts().CPlusPlus; in ParseSwitchStatement() 1733 bool C99orCXX = getLangOpts().C99 || getLangOpts().CPlusPlus; in ParseWhileStatement() 1805 if (getLangOpts().C99) in ParseDoStatement() 1820 bool C99orCXX = getLangOpts().C99 || getLangOpts().CPlusPlus; in ParseDoStatement() 1930 bool C99orCXXorObjC = getLangOpts().C99 || getLangOpts().CPlusPlus || in ParseForStatement() 1931 getLangOpts().ObjC; in ParseForStatement() [all …]
|
| H A D | ParseDeclCXX.cpp | 816 getLangOpts().CPlusPlus17 in ParseUsingDeclaration() 937 if (!getLangOpts().CPlusPlus) in ParseStaticAssertDeclaration() 964 if (getLangOpts().CPlusPlus17) in ParseStaticAssertDeclaration() 968 else if (getLangOpts().C2x) in ParseStaticAssertDeclaration() 1423 if (!getLangOpts().CPlusPlus) in isValidAfterTypeSpecifier() 1589 if (getLangOpts().CPlusPlus) { in ParseClassSpecifier() 2148 if (getLangOpts().HLSL) in ParseBaseSpecifier() 3248 if (getLangOpts().HLSL) in ParseCXXClassMemberDeclarationWithPragmas() 3760 if (getLangOpts().CPlusPlus11) in ParseMemInitializer() 4273 if (getLangOpts().MicrosoftExt || getLangOpts().HLSL) { in ParseCXX11AttributeArgs() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/ |
| H A D | FixItHintUtils.cpp | 22 AmpLocation, Context.getSourceManager(), Context.getLangOpts()); in changeVarDeclToReference() 26 Context.getLangOpts()); in changeVarDeclToReference() 52 Context.getLangOpts()); in skipLParensBackwards() 58 Context.getLangOpts()); in skipLParensBackwards() 136 Var.getLocation(), Context.getSourceManager(), Context.getLangOpts(), in changePointer() 157 Var.getLocation(), Context.getSourceManager(), Context.getLangOpts(), in changePointer() 174 Var.getLocation(), Context.getSourceManager(), Context.getLangOpts(), in changeReferencee()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/ |
| H A D | MisplacedOperatorInStrlenInAllocCheck.cpp | 86 *Result.SourceManager, getLangOpts()); in check() 89 *Result.SourceManager, getLangOpts()); in check() 96 *Result.SourceManager, getLangOpts()); in check() 99 *Result.SourceManager, getLangOpts()); in check()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/android/ |
| H A D | CloexecCheck.cpp | 61 Result.Context->getLangOpts(), in insertMacroFlag() 67 Result.Context->getLangOpts()); in insertMacroFlag() 94 ModeArg, *Result.SourceManager, Result.Context->getLangOpts(), Mode); in insertStringFlag() 108 SM, Result.Context->getLangOpts()); in getSpellingArg()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/ |
| H A D | RawStringLiteralCheck.cpp | 56 *Result.SourceManager, Result.Context->getLangOpts()); in containsEscapedCharacters() 58 Result.Context->getLangOpts()); in containsEscapedCharacters() 134 *Result.SourceManager, getLangOpts())) in check() 144 *Result.SourceManager, getLangOpts()); in replaceWithRawStringLiteral()
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Frontend/ |
| H A D | AnalyzerHelpFlags.cpp | 33 *CI.getAnalyzerOpts(), CI.getLangOpts(), CI.getDiagnostics(), in printCheckerHelp() 44 *CI.getAnalyzerOpts(), CI.getLangOpts(), CI.getDiagnostics(), in printEnabledCheckerList() 53 *CI.getAnalyzerOpts(), CI.getLangOpts(), CI.getDiagnostics(), in printCheckerConfigList()
|