| /llvm-project-15.0.7/clang/include/clang/Basic/ |
| H A D | Features.def | 14 // const LangOptions &LangOpts; 88 FEATURE(blocks, LangOpts.Blocks) 91 FEATURE(cxx_rtti, LangOpts.RTTI &&LangOpts.RTTIData) 113 FEATURE(objc_kindof, LangOpts.ObjC) 114 FEATURE(objc_modules, LangOpts.ObjC && LangOpts.Modules) 138 FEATURE(c_alignas, LangOpts.C11) 139 FEATURE(c_alignof, LangOpts.C11) 140 FEATURE(c_atomic, LangOpts.C11) 225 FEATURE(is_sealed, LangOpts.CPlusPlus &&LangOpts.MicrosoftExt) 231 FEATURE(modules, LangOpts.Modules) [all …]
|
| /llvm-project-15.0.7/clang/lib/Frontend/ |
| H A D | InitPreprocessor.cpp | 449 else if (!LangOpts.GNUMode && LangOpts.Digraphs) in InitializeStandardPredefinedMacros() 796 if (!LangOpts.GNUMode && !LangOpts.MSVCCompat) in InitializePredefinedMacros() 799 if (LangOpts.GNUCVersion && LangOpts.CPlusPlus11) in InitializePredefinedMacros() 871 if (!LangOpts.MSVCCompat && LangOpts.Exceptions) in InitializePredefinedMacros() 873 if (LangOpts.GNUCVersion && LangOpts.RTTI) in InitializePredefinedMacros() 887 if (!LangOpts.MSVCCompat && LangOpts.CPlusPlus) in InitializePredefinedMacros() 1123 if (LangOpts.FastMath || LangOpts.FiniteMathOnly) in InitializePredefinedMacros() 1129 if (LangOpts.GNUInline || LangOpts.CPlusPlus) in InitializePredefinedMacros() 1257 if (LangOpts.CUDAIsDevice && !LangOpts.HIP) { in InitializePredefinedMacros() 1318 if ((LangOpts.CUDA || LangOpts.OpenMPIsDevice || LangOpts.SYCLIsDevice) && in InitializePreprocessor() [all …]
|
| /llvm-project-15.0.7/clang/lib/Basic/ |
| H A D | IdentifierTable.cpp | 75 AddKeywords(LangOpts); in IdentifierTable() 147 if (LangOpts.OpenCL && !LangOpts.OpenCLCPlusPlus && (Flags & KEYOPENCLC)) in getKeywordStatus() 159 if (LangOpts.CPlusPlus && !LangOpts.CPlusPlus20 && (Flags & CHAR8SUPPORT)) in getKeywordStatus() 217 FLAGS, LangOpts, *this); in AddKeywords() 220 FLAGS, LangOpts, *this); in AddKeywords() 225 if (LangOpts.ObjC) \ in AddKeywords() 230 if (LangOpts.ParseUnknownAnytype) in AddKeywords() 232 LangOpts, *this); in AddKeywords() 234 if (LangOpts.DeclSpecKeyword) in AddKeywords() 237 if (LangOpts.IEEE128) in AddKeywords() [all …]
|
| H A D | Builtins.cpp | 65 const LangOptions &LangOpts) { in builtinIsSupported() argument 69 !LangOpts.Coroutines && (BuiltinInfo.Langs & COR_LANG); in builtinIsSupported() 71 LangOpts.NoMathBuiltin && BuiltinInfo.HeaderName && in builtinIsSupported() 75 !LangOpts.MicrosoftExt && (BuiltinInfo.Langs & MS_LANG); in builtinIsSupported() 78 !LangOpts.OpenCL && (BuiltinInfo.Langs & ALL_OCL_LANGUAGES); in builtinIsSupported() 82 !LangOpts.OpenCLPipes && (BuiltinInfo.Langs & OCL_PIPE); in builtinIsSupported() 86 (LangOpts.getOpenCLCompatibleVersion() < 200 || !LangOpts.Blocks) && in builtinIsSupported() 91 !LangOpts.CPlusPlus && BuiltinInfo.Langs == CXX_LANG; in builtinIsSupported() 106 if (builtinIsSupported(BuiltinInfo[i], LangOpts)) { in initializeBuiltins() 112 if (builtinIsSupported(TSRecords[i], LangOpts)) in initializeBuiltins() [all …]
|
| H A D | Module.cpp | 104 .Case("altivec", LangOpts.AltiVec) in hasFeature() 105 .Case("blocks", LangOpts.Blocks) in hasFeature() 111 .Case("c99", LangOpts.C99) in hasFeature() 112 .Case("c11", LangOpts.C11) in hasFeature() 113 .Case("c17", LangOpts.C17) in hasFeature() 116 .Case("objc", LangOpts.ObjC) in hasFeature() 118 .Case("opencl", LangOpts.OpenCL) in hasFeature() 120 .Case("zvector", LangOpts.ZVector) in hasFeature() 128 bool Module::isUnimportable(const LangOptions &LangOpts, in isUnimportable() argument 158 if (isUnimportable(LangOpts, Target, Req, ShadowingModule)) in isAvailable() [all …]
|
| /llvm-project-15.0.7/clang/include/clang/Lex/ |
| H A D | Lexer.h | 103 const LangOptions &LangOpts; variable 173 Lexer(SourceLocation FileLoc, const LangOptions &LangOpts, 181 const SourceManager &SM, const LangOptions &LangOpts, 255 assert((!Val || LexingRawMode || LangOpts.TraditionalCPP) && in SetKeepWhitespaceMode() 340 const LangOptions &LangOpts, 350 const LangOptions &LangOpts, 373 const LangOptions &LangOpts); 379 const LangOptions &LangOpts, 442 ? getAsCharRange(Range.getAsRange(), SM, LangOpts) in getAsCharRange() 499 const LangOptions &LangOpts, [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/ |
| H A D | LexerUtils.cpp | 19 const LangOptions &LangOpts, bool SkipComments) { in getPreviousToken() argument 29 Location = Lexer::GetBeginningOfToken(Location, SM, LangOpts); in getPreviousToken() 30 if (!Lexer::getRawToken(Location, Token, SM, LangOpts) && in getPreviousToken() 41 const LangOptions &LangOpts) { in findPreviousTokenStart() argument 49 return Lexer::GetBeginningOfToken(BeforeStart, SM, LangOpts); in findPreviousTokenStart() 54 const LangOptions &LangOpts, in findPreviousTokenKind() argument 60 SourceLocation L = findPreviousTokenStart(Start, SM, LangOpts); in findPreviousTokenKind() 76 const LangOptions &LangOpts) { in findNextTerminator() argument 85 CurrentToken = Lexer::findNextToken(Start, SM, LangOpts); in findNextTokenSkippingComments() 175 findNextTokenSkippingComments(SpellingLoc, SM, LangOpts); in getSemicolonAfterStmtEndLoc() [all …]
|
| H A D | LexerUtils.h | 26 const LangOptions &LangOpts, bool SkipComments = true); 30 const LangOptions &LangOpts); 34 const LangOptions &LangOpts, 38 const LangOptions &LangOpts); 43 const LangOptions &LangOpts, in findPreviousAnyTokenKind() argument 48 SourceLocation L = findPreviousTokenStart(Start, SM, LangOpts); in findPreviousAnyTokenKind() 54 if (Lexer::getRawToken(L, T, SM, LangOpts, /*IgnoreWhiteSpace=*/true)) in findPreviousAnyTokenKind() 70 Optional<Token> CurrentToken = Lexer::findNextToken(Start, SM, LangOpts); in findNextAnyTokenKind() 91 const LangOptions &LangOpts); 98 const LangOptions &LangOpts); [all …]
|
| /llvm-project-15.0.7/clang/lib/Lex/ |
| H A D | Lexer.cpp | 140 LangOpts(PP.getLangOpts()), LineComment(LangOpts.LineComment), in Lexer() 154 : FileLoc(fileloc), LangOpts(langOpts), LineComment(LangOpts.LineComment), in Lexer() 1465 } else if (LangOpts.CPlusPlus || LangOpts.C2x) { in isAllowedIDChar() 1489 if (LangOpts.CPlusPlus || LangOpts.C2x) { in isAllowedInitiallyIDChar() 1872 if (!LangOpts.MicrosoftExt || !isHexaLiteral(BufferPtr, LangOpts)) in LexNumericConstant() 1894 if (C == '\'' && (LangOpts.CPlusPlus14 || LangOpts.C2x)) { in LexNumericConstant() 3216 if (!LangOpts.CPlusPlus && !LangOpts.C99) { in tryReadNumericUCN() 3450 if (LangOpts.CPlusPlus && !LangOpts.CPlusPlus11) in tryReadUCN() 3669 if (LangOpts.CPlusPlus11 || LangOpts.C11) { in LexTokenInternal() 3699 if (Char2 == '\'' && (LangOpts.CPlusPlus17 || LangOpts.C2x)) in LexTokenInternal() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/pseudo/benchmarks/ |
| H A D | Benchmark.cpp | 75 clang::LangOptions LangOpts = genericLangOpts(); in lexAndPreprocess() local 76 TokenStream RawStream = pseudo::lex(*SourceText, LangOpts); in lexAndPreprocess() 80 cook(DirectiveStructure.stripDirectives(RawStream), LangOpts); in lexAndPreprocess() 87 clang::LangOptions LangOpts = genericLangOpts(); in lex() local 89 clang::pseudo::lex(*SourceText, LangOpts); in lex() 96 clang::LangOptions LangOpts = genericLangOpts(); in pairBrackets() local 97 auto Stream = clang::pseudo::lex(*SourceText, LangOpts); in pairBrackets() 106 clang::LangOptions LangOpts = genericLangOpts(); in preprocess() local 107 TokenStream RawStream = clang::pseudo::lex(*SourceText, LangOpts); in preprocess() 112 cook(DirectiveStructure.stripDirectives(RawStream), LangOpts)); in preprocess()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/ |
| H A D | IsolateDeclarationCheck.cpp | 37 const LangOptions &LangOpts) { in findStartOfIndirection() argument 110 const LangOptions &LangOpts) { in declRanges() argument 144 LangOpts); in declRanges() 151 Start = findPreviousTokenKind(Start, SM, LangOpts, tok::l_paren); in declRanges() 161 Token T = getPreviousToken(Start, SM, LangOpts); in declRanges() 163 Start = findPreviousTokenStart(Start, SM, LangOpts); in declRanges() 190 LangOpts) in declRanges() 191 : findNextTerminator(CurrentDecl->getEndLoc(), SM, LangOpts); in declRanges() 205 const LangOptions &LangOpts) { in collectSourceRanges() argument 212 LangOpts); in collectSourceRanges() [all …]
|
| /llvm-project-15.0.7/clang/unittests/Lex/ |
| H A D | LexerTest.cpp | 58 Diags, LangOpts, Target.get()); in CreatePP() 112 LangOptions LangOpts; member in __anon134ba2be0111::LexerTest 311 SourceMgr, LangOpts); in TEST_F() 322 SourceMgr, LangOpts); in TEST_F() 334 SourceMgr, LangOpts); in TEST_F() 346 SourceMgr, LangOpts); in TEST_F() 352 SourceMgr, LangOpts); in TEST_F() 397 LangOpts); in TEST_F() 405 LangOpts); in TEST_F() 421 SourceMgr, LangOpts); in TEST_F() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/ |
| H A D | UseTrailingReturnTypeCheck.h | 33 bool isLanguageVersionSupported(const LangOptions &LangOpts) const override { in isLanguageVersionSupported() argument 34 return LangOpts.CPlusPlus11; in isLanguageVersionSupported() 46 const SourceManager &SM, const LangOptions &LangOpts); 50 const LangOptions &LangOpts); 55 const LangOptions &LangOpts); 59 const SourceManager &SM, const LangOptions &LangOpts);
|
| H A D | UseTrailingReturnTypeCheck.cpp | 128 const SourceManager &SM, const LangOptions &LangOpts) { in findTrailingReturnTypeSourceLocation() argument 133 LangOpts); in findTrailingReturnTypeSourceLocation() 142 Lexer::getLocForEndOfToken(ClosingParen, 0, SM, LangOpts); in findTrailingReturnTypeSourceLocation() 221 const LangOptions &LangOpts) { in classifyTokensBeforeFunctionName() argument 276 const SourceManager &SM, const LangOptions &LangOpts) { in findReturnTypeAndCVSourceRange() argument 295 classifyTokensBeforeFunctionName(F, Ctx, SM, LangOpts); in findReturnTypeAndCVSourceRange() 335 const SourceManager &SM, const LangOptions &LangOpts) { in keepSpecifiers() argument 347 classifyTokensBeforeFunctionName(F, Ctx, SM, LangOpts); in keepSpecifiers() 430 const LangOptions &LangOpts = getLangOpts(); in check() local 481 SM, LangOpts); in check() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/ |
| H A D | SourceCode.cpp | 280 if (Lexer::getRawToken(Loc, TheTok, SM, LangOpts)) in getTokenLengthAtLoc() 305 -(signed)getTokenLengthAtLoc(EndLoc, SM, LangOpts)); in getLocForTokenBegin() 354 SM, LangOpts) in rangeInCommonFile() 373 LangOpts); in getExpansionTokenRangeInSameFile() 408 SM, LangOpts); in getTokenFileRange() 433 rangeInCommonFile(unionTokenRange(R1, R2, SM, LangOpts), SM, LangOpts); in toHalfOpenFileRange() 601 lex(llvm::StringRef Code, const LangOptions &LangOpts, in lex() argument 630 lex(Content, LangOpts, in collectIdentifierRanges() 641 clang::IdentifierTable KeywordsTable(LangOpts); in isKeyword() 1159 llvm::Optional<LangOptions> LangOpts) { in isHeaderFile() argument [all …]
|
| /llvm-project-15.0.7/clang/include/clang/Tooling/Refactoring/ |
| H A D | RecursiveSymbolVisitor.h | 33 RecursiveSymbolVisitor(const SourceManager &SM, const LangOptions &LangOpts) in RecursiveSymbolVisitor() argument 34 : SM(SM), LangOpts(LangOpts) {} in RecursiveSymbolVisitor() 55 0, SM, LangOpts))) in VisitCXXConstructorDecl() 89 Lexer::getLocForEndOfToken(TypeBeginLoc, 0, SM, LangOpts); in VisitTypeLoc() 110 Lexer::getLocForEndOfToken(TL.getBeginLoc(), 0, SM, LangOpts); in VisitTypedefTypeLoc() 138 const LangOptions &LangOpts; variable 146 return visit(ND, Loc, Lexer::getLocForEndOfToken(Loc, 0, SM, LangOpts)); in visit()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/ |
| H A D | ExtractFunction.cpp | 283 const LangOptions &LangOpts) { in computeEnclosingFuncRange() argument 366 const LangOptions *LangOpts; member 368 const LangOptions *LangOpts) in NewFunction() 369 : SemicolonPolicy(SemicolonPolicy), LangOpts(LangOpts) {} in NewFunction() 453 DefinitionQualifier->print(Oss, *LangOpts); in renderDeclarationName() 706 const LangOptions &LangOpts) { in getSemicolonPolicy() argument 712 LangOpts); in getSemicolonPolicy() 761 &LangOpts); in getExtractedFunction() 864 const LangOptions &LangOpts = Inputs.AST->getLangOpts(); in prepare() local 865 if (!LangOpts.CPlusPlus) in prepare() [all …]
|
| /llvm-project-15.0.7/clang/lib/Tooling/Transformer/ |
| H A D | SourceCode.cpp | 84 const LangOptions &LangOpts) { in getRangeForEdit() argument 96 CharSourceRange Range = Lexer::makeFileCharRange(EditRange, SM, LangOpts); in getRangeForEdit() 124 const LangOptions &LangOpts) { in getEntityEndLoc() argument 141 SM.getLocForStartOfFile(FileOffset.first), LangOpts, File.begin(), in getEntityEndLoc() 269 const LangOptions &LangOpts) { in skipWhitespaceAndNewline() argument 284 const LangOptions &LangOpts) { in atOrBeforeSeparation() argument 302 bool Failed = Lexer::getRawToken(Loc, Tok, SM, LangOpts, in atOrBeforeSeparation() 322 const LangOptions &LangOpts = Context.getLangOpts(); in getAssociatedRange() local 357 LangOpts) && in getAssociatedRange() 358 atOrBeforeSeparation(SM, Range.getEnd(), LangOpts)) { in getAssociatedRange() [all …]
|
| /llvm-project-15.0.7/clang/include/clang/Edit/ |
| H A D | EditedSource.h | 37 const LangOptions &LangOpts; variable 73 EditedSource(const SourceManager &SM, const LangOptions &LangOpts, 75 : SourceMgr(SM), LangOpts(LangOpts), PPRec(PPRec), IdentTable(LangOpts) {} in SourceMgr() 78 const LangOptions &getLangOpts() const { return LangOpts; } in getLangOpts()
|
| /llvm-project-15.0.7/clang/lib/CodeGen/ |
| H A D | CoverageMappingGen.h | 152 const LangOptions &LangOpts; variable 157 const LangOptions &LangOpts) in CoverageMappingGen() argument 158 : CVM(CVM), SM(SM), LangOpts(LangOpts), CounterMap(nullptr) {} in CoverageMappingGen() 161 const LangOptions &LangOpts, in CoverageMappingGen() argument 163 : CVM(CVM), SM(SM), LangOpts(LangOpts), CounterMap(CounterMap) {} in CoverageMappingGen()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/openmp/ |
| H A D | ExceptionEscapeCheck.h | 27 bool isLanguageVersionSupported(const LangOptions &LangOpts) const override { in isLanguageVersionSupported() argument 28 return LangOpts.OpenMP && LangOpts.CPlusPlus && LangOpts.CXXExceptions; in isLanguageVersionSupported()
|
| /llvm-project-15.0.7/clang/lib/Edit/ |
| H A D | EditedSource.cpp | 48 Buf, SourceMgr, LangOpts); in deconstructMacroArgLoc() 317 return !(Lexer::isAsciiIdentifierContinueChar(left, LangOpts) && in canBeJoined() 318 Lexer::isAsciiIdentifierContinueChar(right, LangOpts)); in canBeJoined() 324 const LangOptions &LangOpts) { in canRemoveWhitespace() argument 325 if (!canBeJoined(left, right, LangOpts)) in canRemoveWhitespace() 329 if (canBeJoined(beforeWSpace, right, LangOpts)) in canRemoveWhitespace() 373 LangOpts)) in adjustRemoval() 378 if (!canBeJoined(buffer[begin-1], buffer[end], LangOpts)) in adjustRemoval() 392 adjustRemoval(SM, LangOpts, Loc, offs, len, text); in applyRewrite() 445 applyRewrite(receiver, StrVec, CurOffs, CurLen, SourceMgr, LangOpts, in applyRewrites() [all …]
|
| /llvm-project-15.0.7/clang/lib/Tooling/Inclusions/ |
| H A D | HeaderIncludes.cpp | 22 LangOptions LangOpts; in createLangOpts() local 23 LangOpts.CPlusPlus = 1; in createLangOpts() 24 LangOpts.CPlusPlus11 = 1; in createLangOpts() 25 LangOpts.CPlusPlus14 = 1; in createLangOpts() 26 LangOpts.LineComment = 1; in createLangOpts() 27 LangOpts.CXXOperatorNames = 1; in createLangOpts() 28 LangOpts.Bool = 1; in createLangOpts() 29 LangOpts.ObjC = 1; in createLangOpts() 33 return LangOpts; in createLangOpts() 46 LangOptions LangOpts = createLangOpts(); in getOffsetAfterTokenSequence() local [all …]
|
| /llvm-project-15.0.7/clang/lib/Tooling/Refactoring/Extract/ |
| H A D | SourceExtraction.cpp | 22 const LangOptions &LangOpts) { in isSemicolonAtLocation() argument 25 LangOpts) == ";"; in isSemicolonAtLocation() 74 const LangOptions &LangOpts) { in compute() argument 98 if (isSemicolonAtLocation(End, SM, LangOpts)) in compute() 103 Optional<Token> NextToken = Lexer::findNextToken(End, SM, LangOpts); in compute()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/ |
| H A D | ReservedIdentifierCheck.cpp | 65 const LangOptions &LangOpts) { in hasReservedDoubleUnderscore() argument 66 if (LangOpts.CPlusPlus) in hasReservedDoubleUnderscore() 72 getDoubleUnderscoreFixup(StringRef Name, const LangOptions &LangOpts) { in getDoubleUnderscoreFixup() argument 73 if (hasReservedDoubleUnderscore(Name, LangOpts)) in getDoubleUnderscoreFixup() 111 const LangOptions &LangOpts, bool Invert, in getFailureInfoImpl() argument 137 if (auto Fixup = getDoubleUnderscoreFixup(InProgressFixup(), LangOpts)) in getFailureInfoImpl() 147 if (!(hasReservedDoubleUnderscore(Name, LangOpts) || in getFailureInfoImpl()
|