| /openbsd-src/gnu/llvm/clang/lib/Sema/ |
| H A D | HLSLExternalSemaSource.cpp | 45 ASTContext &AST = S.getASTContext(); in BuiltinTypeDeclBuilder() local 46 IdentifierInfo &II = AST.Idents.get(Name, tok::TokenKind::identifier); in BuiltinTypeDeclBuilder() 65 Record = CXXRecordDecl::Create(AST, TagDecl::TagKind::TTK_Class, in BuiltinTypeDeclBuilder() 73 Record->addAttr(FinalAttr::CreateImplicit(AST, SourceRange(), in BuiltinTypeDeclBuilder() 90 ASTContext &AST = Record->getASTContext(); in addMemberVariable() local 92 IdentifierInfo &II = AST.Idents.get(Name, tok::TokenKind::identifier); in addMemberVariable() 94 AST.getTrivialTypeSourceInfo(Type, SourceLocation()); in addMemberVariable() 96 AST, Record, SourceLocation(), SourceLocation(), &II, Type, MemTySource, in addMemberVariable() 129 static DeclRefExpr *lookupBuiltinFunction(ASTContext &AST, Sema &S, in lookupBuiltinFunction() 132 IdentifierInfo &II = AST.Idents.get(Name, tok::TokenKind::identifier); in lookupBuiltinFunction() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Support/ |
| H A D | Z3Solver.cpp | 149 Z3_ast AST; member in __anon0349533b0111::Z3Expr 152 Z3Expr(Z3Context &C, Z3_ast ZA) : SMTExpr(), Context(C), AST(ZA) { in Z3Expr() 153 Z3_inc_ref(Context.Context, AST); in Z3Expr() 157 Z3Expr(const Z3Expr &Copy) : SMTExpr(), Context(Copy.Context), AST(Copy.AST) { in Z3Expr() 158 Z3_inc_ref(Context.Context, AST); in Z3Expr() 164 Z3_inc_ref(Context.Context, Other.AST); in operator =() 165 Z3_dec_ref(Context.Context, AST); in operator =() 166 AST = Other.AST; in operator =() 174 if (AST) in ~Z3Expr() 175 Z3_dec_ref(Context.Context, AST); in ~Z3Expr() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/CodeGen/ |
| H A D | MachineModuleSlotTracker.cpp | 16 AbstractSlotTrackerStorage *AST, const MachineFunction &MF) { in processMachineFunctionMetadata() argument 23 AST->createMetadataSlot(AAInfo.TBAA); in processMachineFunctionMetadata() 25 AST->createMetadataSlot(AAInfo.TBAAStruct); in processMachineFunctionMetadata() 27 AST->createMetadataSlot(AAInfo.Scope); in processMachineFunctionMetadata() 29 AST->createMetadataSlot(AAInfo.NoAlias); in processMachineFunctionMetadata() 34 AbstractSlotTrackerStorage *AST, const Module *M, in processMachineModule() argument 40 MDNStartSlot = AST->getNextMetadataSlot(); in processMachineModule() 42 processMachineFunctionMetadata(AST, *MF); in processMachineModule() 43 MDNEndSlot = AST->getNextMetadataSlot(); in processMachineModule() 50 AbstractSlotTrackerStorage *AST, const Function *F, in processMachineFunction() argument [all …]
|
| /openbsd-src/gnu/llvm/llvm/utils/gn/secondary/clang/lib/AST/ |
| H A D | BUILD.gn | 4 visibility = [ ":AST" ] 10 visibility = [ ":AST" ] 15 static_library("AST") { 21 "//clang/include/clang/AST:AttrImpl", 22 "//clang/include/clang/AST:AttrNodeTraverse", 23 "//clang/include/clang/AST:AttrTextNodeDump", 24 "//clang/include/clang/AST:CommentCommandInfo", 25 "//clang/include/clang/AST:CommentHTMLNamedCharacterReferences", 26 "//clang/include/clang/AST:CommentHTMLTags", 27 "//clang/include/clang/AST:CommentHTMLTagsProperties", [all …]
|
| /openbsd-src/gnu/llvm/clang/lib/Frontend/ |
| H A D | ASTUnit.cpp | 776 ASTUnit &AST, in ConfigureDiags() argument 781 &AST.StoredDiagnostics, nullptr, in ConfigureDiags() 792 std::unique_ptr<ASTUnit> AST(new ASTUnit(true)); in LoadFromASTFile() local 796 ASTUnitCleanup(AST.get()); in LoadFromASTFile() 801 ConfigureDiags(Diags, *AST, CaptureDiagnostics); in LoadFromASTFile() 803 AST->LangOpts = std::make_shared<LangOptions>(); in LoadFromASTFile() 804 AST->OnlyLocalDecls = OnlyLocalDecls; in LoadFromASTFile() 805 AST->CaptureDiagnostics = CaptureDiagnostics; in LoadFromASTFile() 806 AST->Diagnostics = Diags; in LoadFromASTFile() 807 AST->FileMgr = new FileManager(FileSystemOpts, VFS); in LoadFromASTFile() [all …]
|
| H A D | FrontendAction.cpp | 146 std::unique_ptr<ASTUnit> AST) { in setCurrentInput() argument 148 CurrentASTUnit = std::move(AST); in setCurrentInput() 614 std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromASTFile( in BeginSourceFile() local 618 if (!AST) in BeginSourceFile() 623 CI.getHeaderSearchOpts() = AST->getHeaderSearchOpts(); in BeginSourceFile() 624 CI.getPreprocessorOpts() = AST->getPreprocessorOpts(); in BeginSourceFile() 625 CI.getLangOpts() = AST->getLangOpts(); in BeginSourceFile() 629 CI.setFileManager(&AST->getFileManager()); in BeginSourceFile() 631 CI.getSourceManager().initializeForReplay(AST->getSourceManager()); in BeginSourceFile() 636 if (auto ASTReader = AST->getASTReader()) { in BeginSourceFile() [all …]
|
| /openbsd-src/gnu/llvm/clang/docs/ |
| H A D | IntroductionToTheClangAST.rst | 2 Introduction to the Clang AST 6 AST. It is targeted at developers who either want to contribute to 7 Clang, or use tools that work based on Clang's AST, like the AST 19 Clang's AST is different from ASTs produced by some other compilers in 22 constants are available in an unreduced form in the AST. This makes 23 Clang's AST a good fit for refactoring tools. 25 Documentation for all Clang AST nodes is available via the generated 28 make a search for clang and the AST node's class name usually turn up 32 Examining the AST 35 A good way to familiarize yourself with the Clang AST is to actually look [all …]
|
| H A D | PCHInternals.rst | 60 headers to save a serialized AST file (one per module) and use those AST 65 AST file format required for modules are discussed in the section on 68 Clang's AST files are designed with a compact on-disk representation, which 69 minimizes both creation time and the time required to initially load the AST 70 file. The AST file itself contains a serialized representation of Clang's 75 Clang's AST files are loaded "lazily" from disk. When an AST file is initially 76 loaded, Clang reads only a small amount of data from the AST file to establish 78 this initial load is independent of the size of the AST file, such that a 79 larger AST file does not lead to longer AST load times. The actual header data 80 in the AST file --- macros, functions, variables, types, etc. --- is loaded [all …]
|
| H A D | LibASTMatchers.rst | 2 Matching the Clang AST 6 nodes of the AST and execute code that uses the matched nodes. Combined with 10 We assume basic knowledge about the Clang AST. See the :doc:`Introduction 11 to the Clang AST <IntroductionToTheClangAST>` if you want to learn more 12 about how the AST is structured. 20 Clang's AST. This DSL is written in and can be used from C++, allowing users 21 to write a single program to both match AST nodes and access the node's C++ 23 provided on the AST level. 25 AST matchers are predicates on nodes in the AST. Matchers are created by 30 in the AST of a translation unit, you can call `recordDecl() [all …]
|
| H A D | RAVFrontendAction.rst | 9 a RecursiveASTVisitor to find CXXRecordDecl AST nodes with a specified 18 actions as part of the compilation. To run tools over the AST clang 37 ASTConsumer is an interface used to write generic actions on an AST, 38 regardless of how the AST was produced. ASTConsumer provides many 49 // will visit all nodes in the AST. 61 RecursiveASTVisitor to extract the relevant information from the AST. 64 VisitNodeType(NodeType \*) for most AST nodes; the exception are TypeLoc 77 // For debugging, dumping the AST nodes will show which nodes are already 82 // Return false to stop the traversal of the AST. 88 of the Clang AST to drill through to the parts that are interesting for [all …]
|
| H A D | LibASTImporter.rst | 5 The ``ASTImporter`` class is part of Clang's core library, the AST library. 8 In this document, we assume basic knowledge about the Clang AST. See the :doc:`Introduction 9 to the Clang AST <IntroductionToTheClangAST>` if you want to learn more 10 about how the AST is structured. 11 Knowledge about :doc:`matching the Clang AST <LibASTMatchers>` and the `reference for the matchers … 19 ``ASTContext`` holds long-lived AST nodes (such as types and decls) that can be referred to through… 22 It may be convenient if we could view the set of the resulting ASTs as if they were one AST resulti… 29 … ``ASTContext`` for that and then imports the missing definitions from the AST what we got from th… 34 Importing one AST node copies that node into the destination ``ASTContext``. 38 Also, the Clang AST consider nodes (or certain properties of nodes) equivalent if they have the sam… [all …]
|
| H A D | Tooling.rst | 26 * want powerful high-level abstractions, like iterating through an AST with a 27 cursor, and don't want to learn all the nitty gritty details of Clang's AST. 31 * want full control over the Clang AST 37 AST as part of a compilation. Plugins are dynamic libraries that are loaded at 50 * need full control over the Clang AST 74 * want full control over the Clang AST 80 * want a stable interface so you don't need to change your code when the AST API
|
| /openbsd-src/gnu/usr.bin/clang/include/clang/AST/ |
| H A D | Makefile | 69 AbstractBasicReader.inc: ${CLANG_INC}/clang/AST/PropertiesBase.td 73 AbstractBasicWriter.inc: ${CLANG_INC}/clang/AST/PropertiesBase.td 77 AbstractTypeReader.inc: ${CLANG_INC}/clang/AST/TypeProperties.td 81 AbstractTypeWriter.inc: ${CLANG_INC}/clang/AST/TypeProperties.td 89 CommentHTMLTags.inc: ${CLANG_INC}/clang/AST/CommentHTMLTags.td 93 CommentHTMLTagsProperties.inc: ${CLANG_INC}/clang/AST/CommentHTMLTags.td 98 ${CLANG_INC}/clang/AST/CommentHTMLNamedCharacterReferences.td 102 CommentCommandInfo.inc: ${CLANG_INC}/clang/AST/CommentCommands.td 106 CommentCommandList.inc: ${CLANG_INC}/clang/AST/CommentCommands.td 110 StmtDataCollectors.inc: ${CLANG_INC}/clang/AST/StmtDataCollectors.td
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/Analysis/ |
| H A D | AliasSetTracker.h | 112 AliasSet *getAliasSet(AliasSetTracker &AST) { in getAliasSet() argument 116 AS = OldAS->getForwardedTarget(AST); in getAliasSet() 118 OldAS->dropRef(AST); in getAliasSet() 185 void dropRef(AliasSetTracker &AST) { in dropRef() argument 188 removeFromTracker(AST); in dropRef() 206 void mergeSetIn(AliasSet &AS, AliasSetTracker &AST, BatchAAResults &BatchAA); 273 AliasSet *getForwardedTarget(AliasSetTracker &AST) { in getForwardedTarget() argument 276 AliasSet *Dest = Forward->getForwardedTarget(AST); in getForwardedTarget() 279 Forward->dropRef(AST); in getForwardedTarget() 285 void removeFromTracker(AliasSetTracker &AST); [all …]
|
| /openbsd-src/gnu/llvm/clang/include/clang/ |
| H A D | module.modulemap | 9 // FIXME: Exclude these headers to avoid pulling all of the AST matchers 11 // importing the AST matchers library gives a link dependency on the AST 12 // matchers (and thus the AST), which clang-format should not have. 18 umbrella "AST" 20 textual header "AST/BuiltinTypes.def" 21 textual header "AST/CXXRecordDeclDefinitionBits.def" 22 textual header "AST/OperationKinds.def" 23 textual header "AST/TypeLocNodes.def" 99 module AST { header "AST/ASTDiagnostic.h" export * } 100 module Comment { header "AST/CommentDiagnostic.h" export * } [all …]
|
| /openbsd-src/gnu/llvm/clang/include/clang/AST/ |
| H A D | ExternalASTMerger.h | 54 ASTContext *AST; member 74 ASTContext &AST; member 84 ASTContext &AST; variable 95 ImporterSource(ASTContext &AST, FileManager &FM, const OriginMap &OM, 97 : AST(AST), FM(FM), OM(OM), Temporary(Temporary), Merger(Merger) {} in AST() function 98 ASTContext &getASTContext() const { return AST; } in getASTContext()
|
| /openbsd-src/gnu/llvm/clang/include/clang/Tooling/Refactoring/ |
| H A D | RefactoringRuleContext.h | 45 bool hasASTContext() const { return AST; } in hasASTContext() 48 assert(AST && "no AST!"); in getASTContext() 49 return *AST; in getASTContext() 52 void setASTContext(ASTContext &Context) { AST = &Context; } in setASTContext() 78 ASTContext *AST = nullptr; variable
|
| /openbsd-src/gnu/llvm/clang/include/clang/Basic/ |
| H A D | DiagnosticSerializationKinds.td | 10 let CategoryName = "AST Deserialization Issue" in { 17 "malformed or corrupted AST file: '%0'">, DefaultFatal; 22 "%select{precompiled header|module file|AST file}1 '%2' was built" 36 "%select{AST file was|current translation unit is}0 compiled with the target " 37 "feature '%1' but the %select{current translation unit is|AST file was}0 " 60 "%select{PCH|module|AST}0 file '%1' not found%select{|: %3}2">, DefaultFatal; 62 "%select{PCH|module|AST}0 file '%1' is out of date and " 65 "file '%1' is not a valid precompiled %select{PCH|module|AST}0 file">, DefaultFatal; 69 "AST file '%0' was not built as a module">, DefaultFatal; 81 "module '%0' in AST file '%1' %select{(imported by AST file '%2') |}4" [all …]
|
| /openbsd-src/gnu/llvm/clang/lib/Tooling/ASTDiff/ |
| H A D | ASTDiff.cpp | 115 Impl(SyntaxTree *Parent, ASTContext &AST); 117 Impl(SyntaxTree *Parent, Decl *N, ASTContext &AST); 118 Impl(SyntaxTree *Parent, Stmt *N, ASTContext &AST); 121 std::enable_if_t<std::is_base_of_v<Stmt, T>, T> *Node, ASTContext &AST) in Impl() argument 122 : Impl(Parent, dyn_cast<Stmt>(Node), AST) {} in Impl() 125 std::enable_if_t<std::is_base_of_v<Decl, T>, T> *Node, ASTContext &AST) in Impl() argument 126 : Impl(Parent, dyn_cast<Decl>(Node), AST) {} in Impl() 129 ASTContext &AST; member in clang::diff::SyntaxTree::Impl 232 if (isNodeExcluded(Tree.AST.getSourceManager(), D)) in TraverseDecl() 242 if (isNodeExcluded(Tree.AST.getSourceManager(), S)) in TraverseStmt() [all …]
|
| /openbsd-src/gnu/llvm/clang/lib/AST/ |
| H A D | ExternalASTMerger.cpp | 213 Parent.HasImporterForOrigin(*FromOrigins.at(FromDC).AST)) { in Imported() 219 << (void*)FromOrigins.at(FromDC).AST in Imported() 284 LazyASTImporter &Importer = LazyImporterForOrigin(*this, *Origin.AST); in ForEachMatchingDC() 302 << ", (ASTContext*)" << (void*)&Target.AST in ForEachMatchingDC() 371 LazyASTImporter &Importer = LazyImporterForOrigin(*this, *Origin.AST); in MaybeRecordOrigin() 374 LookupSameContext(Origin.AST->getTranslationUnitDecl(), ToDC, Reverse); in MaybeRecordOrigin() 382 << ", (ASTContext*)" << (void*)&Origin.AST in MaybeRecordOrigin() 388 RecordOriginImpl(ToDC, Origin, ImporterForOrigin(*Origin.AST)); in ForceRecordOrigin() 400 *Target.AST.getTranslationUnitDecl()); in ExternalASTMerger() 405 assert(&D->getASTContext() == &Target.AST); in FindOriginalDecl() [all …]
|
| /openbsd-src/gnu/llvm/clang/lib/Tooling/Refactoring/Extract/ |
| H A D | Extract.cpp | 109 ASTContext &AST = Context.getASTContext(); in createSourceReplacements() local 110 SourceManager &SM = AST.getSourceManager(); in createSourceReplacements() 111 const LangOptions &LangOpts = AST.getLangOpts(); in createSourceReplacements() 117 QualType ReturnType = AST.VoidTy; in createSourceReplacements() 143 PrintingPolicy PP = AST.getPrintingPolicy(); in createSourceReplacements()
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/CodeGen/ |
| H A D | MachineModuleSlotTracker.h | 27 void processMachineFunctionMetadata(AbstractSlotTrackerStorage *AST, 29 void processMachineModule(AbstractSlotTrackerStorage *AST, const Module *M, 31 void processMachineFunction(AbstractSlotTrackerStorage *AST,
|
| /openbsd-src/gnu/llvm/llvm/lib/Analysis/ |
| H A D | AliasSetTracker.cpp | 43 void AliasSet::mergeSetIn(AliasSet &AS, AliasSetTracker &AST, in mergeSetIn() argument 69 AST.TotalMayAliasSetSize += size(); in mergeSetIn() 71 AST.TotalMayAliasSetSize += AS.size(); in mergeSetIn() 101 AS.dropRef(AST); in mergeSetIn() 121 void AliasSet::removeFromTracker(AliasSetTracker &AST) { in removeFromTracker() argument 123 AST.removeAliasSet(this); in removeFromTracker() 126 void AliasSet::addPointer(AliasSetTracker &AST, PointerRec &Entry, in addPointer() argument 135 BatchAAResults &AA = AST.getAliasAnalysis(); in addPointer() 141 AST.TotalMayAliasSetSize += size(); in addPointer() 161 AST.TotalMayAliasSetSize++; in addPointer() [all …]
|
| /openbsd-src/gnu/llvm/clang/include/clang/Tooling/ASTDiff/ |
| H A D | ASTDiff.h | 57 SyntaxTree(ASTContext &AST); 60 SyntaxTree(T *Node, ASTContext &AST) in SyntaxTree() argument 61 : TreeImpl(std::make_unique<Impl>(this, Node, AST)) {} in SyntaxTree()
|
| /openbsd-src/gnu/llvm/llvm/docs/HistoricalNotes/ |
| H A D | 2007-OriginalClangReadme.txt | 33 libast - Provides classes to represent the C AST, the C type system, 35 manipulating the AST (visitors, pretty printers, etc). This 46 libsema - Provides a set of parser actions to build a standardized AST 47 for programs. AST's are 'streamed' out a top-level declaration 67 libcodegen - Lower the AST to LLVM IR for optimization & codegen. Depends 78 compiler tool, it makes sense to take those plus the AST building and semantic 80 you'd take these components plus the AST to LLVM lowering code. 110 * -parse-noop parses code without building an AST. This is useful 111 for timing the cost of the parser without including AST building 115 useful for timing AST building vs -parse-noop.
|