| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 94211
|
|
|
|
|
|
|
| |
resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of
computed.
llvm-svn: 91370
|
|
|
|
|
|
| |
CIndex to pass in the right directory (previously it was using the path to the main executable, which generally is wrong).
llvm-svn: 91238
|
|
|
|
|
|
| |
DiagnosticOptions, and update callers to make sure they don't pass in a temporary.
llvm-svn: 90704
|
|
|
|
|
|
| |
propogate and simplify.
llvm-svn: 90379
|
|
|
|
|
|
|
|
| |
*something*.
- We really need to fix how LLVM's build systems manage
linking. Pretty-please-someone-else-do-this? :)
llvm-svn: 90350
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(clang/driver) command line arguments (including the source file).
- The arguments are expected to include the source file.
- The idea is that even though this is a somewhat odd API, its the form which
many tools can most easily use (for example, by interposing with the compiler).
Also, switch index-test's -ast-from-source to use this entry point, and provide
a -arg command line argument which can be used to test that the command line
arguments are handled correctly.
llvm-svn: 90288
|
|
|
|
| |
llvm-svn: 90229
|
|
|
|
|
|
|
| |
Also, add an -ast-from-source option to index-test which allows index-test to
run on source files directly.
llvm-svn: 90223
|
|
|
|
|
|
| |
Removing this shared data should enable clang_createTranslationUnit/clang_createTranslationUnitFromSourceFile to be run from multiple threads (related to <rdar://problem/7303432>).
llvm-svn: 84499
|
|
|
|
|
|
|
| |
-A NamedDecl reference
-A TypeLoc
llvm-svn: 83095
|
|
|
|
|
|
| |
control of this.
llvm-svn: 82430
|
|
|
|
|
|
| |
taking an external reference (which was leaked in the case of the CIndex library).
llvm-svn: 82429
|
|
|
|
| |
llvm-svn: 81346
|
|
|
|
|
|
| |
Work in progress.
llvm-svn: 80367
|
|
|
|
| |
llvm-svn: 79557
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Passing something that isn't a string used to cause:
"argument to annotate attribute was not a string literal"
make it say "section attribute" instead.
2. Fix the location of the above message to point to the
bad argument instead of the section token.
3. Implement rdar://4341926, by diagnosing invalid section
specifiers in the frontend rather than letting them slip all
the way to the assembler (a QoI win).
An example of #3 is that we used to produce something like this:
/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Expected comma after segment-name
/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Rest of line ignored. 1st junk character valued 46 (.).
Daniel improved clang to use llvm_report_error, so now we got:
$ clang t.c -c
fatal error: error in backend: Global variable 'x' has an invalid section specifier 'sadf': mach-o section specifier
requires a segment and section separated by a comma.
with no loc info. Now we get:
$ clang t.c -fsyntax-only
t.c:4:30: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment
and section separated by a comma
int x __attribute__((section("sadf")));
^
which is nice :)
llvm-svn: 78586
|
|
|
|
|
|
|
| |
-Accept an ObjC method and find all message expressions that this method may respond to.
-Accept an ObjC message expression and find all methods that may respond to it.
llvm-svn: 77551
|
|
|
|
| |
llvm-svn: 77547
|
|
|
|
| |
llvm-svn: 77542
|
|
|
|
|
|
|
|
|
|
| |
like finding
references of a declaration across translation units.
-Modify the index-test tool to use it.
llvm-svn: 77536
|
|
|
|
| |
llvm-svn: 77530
|
|
|
|
|
|
| |
of the iterator of the Indexer class.
llvm-svn: 77528
|
|
|
|
|
|
| |
-Introduce Indexer as an IndexProvider implementation.
llvm-svn: 77524
|
|
|
|
|
|
|
|
|
|
| |
Entity can now refer to declarations that are not visible outside the translation unit.
It is a wrapper of a pointer union, it's either a Decl* for declarations that don't
"cross" translation units, or an EntityImpl* which is associated with the specific "visible" Decl.
Included is a test case for handling fields across translation units.
llvm-svn: 76515
|
|
|
|
| |
llvm-svn: 76506
|
|
|
|
|
|
| |
the ASTLocation references.
llvm-svn: 76336
|
|
|
|
|
|
| |
all declarations of the same decl" without knowing the exact type.
llvm-svn: 76298
|
|
|
|
| |
llvm-svn: 75605
|
|
|
|
| |
llvm-svn: 75599
|
|
|
|
| |
llvm-svn: 75596
|
|
|
|
| |
llvm-svn: 74896
|
|
|
|
|
|
| |
index-test.cpp.
llvm-svn: 74863
|
|
|
|
|
|
|
|
| |
-Change hasStmt() to isStmt()
-Add isDecl()
-Add getSourceRange()
llvm-svn: 74862
|
|
|
|
|
|
|
|
| |
Index library.
Also, cut down its comments; more comments will be added to ASTLocation.
llvm-svn: 74860
|
|
|
|
| |
llvm-svn: 74859
|
|
|
|
|
|
| |
ASTLocation is a much better name for its intended purpose which to represent a "point" into the AST.
llvm-svn: 74858
|
|
|
|
|
|
|
|
|
| |
'index-test' is now able to provide additional info for a Decl, through multiple AST files:
-Find declarations
-Find definitions
-Find references
llvm-svn: 74803
|
|
|
|
|
|
| |
the index-test tool.
llvm-svn: 74798
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declaration in the AST.
The new ASTContext::getCommentForDecl function searches for a comment
that is attached to the given declaration, and returns that comment,
which may be composed of several comment blocks.
Comments are always available in an AST. However, to avoid harming
performance, we don't actually parse the comments. Rather, we keep the
source ranges of all of the comments within a large, sorted vector,
then lazily extract comments via a binary search in that vector only
when needed (which never occurs in a "normal" compile).
Comments are written to a precompiled header/AST file as a blob of
source ranges. That blob is only lazily loaded when one requests a
comment for a declaration (this never occurs in a "normal" compile).
The indexer testbed now supports comment extraction. When the
-point-at location points to a declaration with a Doxygen-style
comment, the indexer testbed prints the associated comment
block(s). See test/Index/comments.c for an example.
Some notes:
- We don't actually attempt to parse the comment blocks themselves,
beyond identifying them as Doxygen comment blocks to associate them
with a declaration.
- We won't find comment blocks that aren't adjacent to the
declaration, because we start our search based on the location of
the declaration.
- We don't go through the necessary hops to find, for example,
whether some redeclaration of a declaration has comments when our
current declaration does not. Similarly, we don't attempt to
associate a \param Foo marker in a function body comment with the
parameter named Foo (although that is certainly possible).
- Verification of my "no performance impact" claims is still "to be
done".
llvm-svn: 74704
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is simple enough, but then I thought it would be nice to make PrintingPolicy
get a LangOptions so that various things can key off "bool" and "C++" independently.
This spiraled out of control. There are many fixme's, but I think things are slightly
better than they were before.
One thing that can be improved: CFG should probably have an ASTContext pointer in it,
which would simplify its clients.
llvm-svn: 74493
|
|
|
|
| |
llvm-svn: 74433
|
|
|
|
| |
llvm-svn: 74214
|
|
|
|
| |
llvm-svn: 74207
|
|
This tool will be the test bed for indexing related operations. It basically reads PCH files passed by the command line and performs various operations.
Currently it can accept a file:line:column which resolves to a declaration/statement and displays some information about them.
llvm-svn: 74198
|