Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite Clang interface to use C++ libtooling API instead of libclang #1740

Closed
wants to merge 88 commits into from
Closed
Show file tree
Hide file tree
Changes from 75 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
bd73c08
Initial implementation of clang tooling API
rinon Feb 15, 2020
59e2432
Allow visiting of more AST nodes
rinon Feb 15, 2020
dea6a70
Implement Eq correctly for ASTNode
rinon Feb 17, 2020
d41bb18
Do not visit initial node when visiting children
rinon Feb 17, 2020
d6b1474
Do not return attributed or paren types from clang
rinon Feb 17, 2020
b8926d9
Handle null QualTypes gracefully
rinon Feb 17, 2020
b02deab
Check for null in more ClangAST functions
rinon Feb 19, 2020
7fb94d1
Return the first type that matches in getType
rinon Feb 19, 2020
2652681
Validate that we can lay out a RecordDecl before getting field offsets
rinon Feb 19, 2020
8dd5154
Don't visit implicit decls or CXXRecordDecl in ClassTemplates
rinon Feb 19, 2020
ecdbf84
Make ClassTemplateDecl canonical for templated classes
rinon Feb 19, 2020
93b975a
Remove unnecessary manual implementations of PartialEq, etc.
rinon Feb 19, 2020
ad220b0
Clean up visitors
rinon Feb 19, 2020
b42adbd
Visit templated type locations
rinon Feb 19, 2020
6668893
Correctly report comment kinds
rinon Feb 19, 2020
a1bdd75
Visit more TypeLocs
rinon Feb 19, 2020
f8dec45
Visit CXXBaseSpecifier nodes
rinon Feb 19, 2020
1618ffc
Clean up warning
rinon Feb 20, 2020
9ce7939
Add Attr to node and track node kinds correctly
rinon Feb 20, 2020
e883c52
Build stringref from llvm::StringRef
rinon Feb 20, 2020
0317bfa
Support building against latest LLVM master
rinon Feb 20, 2020
832820e
Add support for visiting preprocessor entities
rinon Feb 20, 2020
3fc7daf
Check for valid source range before tokenizing
rinon Feb 20, 2020
7913cbd
Avoid infinite recursion when visiting decls as TypeRefs
rinon Feb 20, 2020
7e3a4ae
Implement support for getDefinition on Objective-C nodes
rinon Feb 20, 2020
a68c996
Add type null checks
rinon Feb 20, 2020
d0e7d58
Check that expr is not value dependent before evaluating
rinon Feb 20, 2020
0446e60
Clean up record validation and support validating class bases as well
rinon Feb 20, 2020
fec0814
Clean up traversal
rinon Feb 20, 2020
1e3af56
Validate cursor based on its own kind, not the derived kind of its node
rinon Feb 20, 2020
7735a89
Rewrite TypeLoc traversal
rinon Feb 20, 2020
19badfd
Fix logic in Expr_Evaluate
rinon Feb 20, 2020
0362eac
Add SourceRange getters for CXXBaseSpecifier, Attr, and PreprocessedE…
rinon Feb 20, 2020
3523b23
Clean up string transfer from C->Rust
rinon Feb 20, 2020
0e76552
Adjust the end of the range given in tokenize
rinon Feb 20, 2020
d09a320
Add support for visiting children of reference cursors
rinon Feb 21, 2020
f78bee2
Visit type and template references in SizeOfPackExpr
rinon Feb 21, 2020
9dc2346
Visit references from template names
rinon Feb 21, 2020
fca9753
Support correct spelling of objective-c decls
rinon Feb 21, 2020
3e034d1
Get correct result type for Objective-C methods
rinon Feb 21, 2020
ae382f1
Support Objective-C categories and references
rinon Feb 21, 2020
1ed0781
Handle Objective-C id, class, and sel types correctly
rinon Feb 21, 2020
8c0ffe3
Visit more Objective-C AST nodes
rinon Feb 21, 2020
e0ed47a
Sanitize a couple more type return sites
rinon Feb 21, 2020
137e47e
Explicitly visit ObjCTypeParamDecls
rinon Feb 21, 2020
919124d
Fix incorrect comparison for break value
rinon Feb 21, 2020
6115d41
Fix warning
rinon Feb 21, 2020
2c28a58
Implement support for parsing of unsaved files
rinon Feb 21, 2020
4ea4609
Use command-line args to tell preprocessor to keep detailed records
rinon Feb 21, 2020
5c2d4f9
Clean up build script
rinon Feb 22, 2020
2334ffc
Don't try to link against LLVM FrontendOpenMP component for LLVM vers…
rinon Feb 22, 2020
272ef10
Guard OpenCLExtensionTypes for only clang version 9+
rinon Feb 22, 2020
9fc9974
Reorganize clang interface and extract LLVM code
rinon Feb 22, 2020
02cb226
Use Ubuntu 16.04 LLVM packages so we can link against the correct lib…
rinon Feb 22, 2020
a6ddacd
Make clang interface compile with Clang 8
rinon Feb 27, 2020
8d82749
Build with Clang 7
rinon Mar 2, 2020
80fe522
Build with Clang 6
rinon Mar 2, 2020
4e6809b
Build with Clang 5
rinon Mar 2, 2020
d6d48c0
Build with Clang 4
rinon Mar 2, 2020
2c1444d
Move getMangling functions to libclang_compat.cpp
rinon Mar 2, 2020
7df04f4
Build with Clang 3.9
rinon Mar 2, 2020
bc57ed1
Build with Clang 3.8
rinon Mar 2, 2020
4e3c5dd
Include correct headers compatible with all Clang versions
rinon Mar 2, 2020
d18d554
Fix expectations for tests that now check struct field offsets
rinon Mar 2, 2020
da05e77
Update expectations for clang 3.9
rinon Mar 3, 2020
deea936
Support getSpelling for PreprocessedEntity
rinon Mar 3, 2020
9ccb4d1
Move CXEvalResultKind definition for LLVM <= 3.8 into impl header
rinon Mar 3, 2020
94db32b
Do not visit children of implicit decls unless the decl is base
rinon Mar 3, 2020
40ed73d
Add doc strings
rinon Mar 3, 2020
b7e161d
Remove completed TODO
rinon Mar 3, 2020
3b16276
Add support for getting the access specifier of CXXBaseSpecifier nodes
rinon Mar 3, 2020
c11af74
Reimplement get_included_file_name
rinon Mar 3, 2020
35b3d98
Clean up old comments and whitespace
rinon Mar 3, 2020
3b222e1
Cargo fmt modified and new files
rinon Mar 3, 2020
b4c7c2d
Remove outdated uses of clang_sys
rinon Mar 3, 2020
22e39c2
Include missing header
rinon Mar 4, 2020
bf1155a
Plug memory leaks
rinon Mar 15, 2020
8fa4e6a
Fix build warning
rinon Mar 18, 2020
854d663
Include <cstdint> instead of explicitly defining types
rinon Mar 18, 2020
79f7568
Make clang interface C only to avoid C++ mangling issues
rinon Mar 19, 2020
bd1d72a
Remove old CXXFLAG
rinon Mar 19, 2020
8a5d6d1
Silence warning and add static asserts to validate assumptions
rinon Mar 19, 2020
d7dacc3
Support building on Windows
rinon Mar 19, 2020
86c6cc5
Build list of libraries to link against in cmake
rinon Mar 19, 2020
ff7f76f
Generate dependency list from cmake for clang shared libraries
rinon Mar 20, 2020
e1748a7
Switch to C++11 (we don't use any C++14)
rinon Mar 20, 2020
6dae240
Default to linking against LLVM and clang-cpp shared libs if available
rinon Mar 20, 2020
1a5821f
Pass QualTypes to Rust as void* to avoid ABI issues
rinon Mar 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ diff = "0.1"
clap = "2"
shlex = "0.1"

[build-dependencies]
cmake = "0.1"

[dependencies]
bitflags = "1.0.3"
cexpr = "0.3.6"
Expand Down
Loading