summaryrefslogtreecommitdiffstats
path: root/clang/tools/index-test
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate index-test; all of its tested functionality is now in c-index-test.Douglas Gregor2010-01-223-382/+0
| | | | llvm-svn: 94211
* Add -resource-dir to clang -cc1, this allows the base directory for compilerDaniel Dunbar2009-12-151-4/+3
| | | | | | | resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of computed. llvm-svn: 91370
* Lift builtin-include-path logic out of ASTUnit::LoadFromCommandLine and fix ↵Daniel Dunbar2009-12-131-2/+5
| | | | | | CIndex to pass in the right directory (previously it was using the path to the main executable, which generally is wrong). llvm-svn: 91238
* Document that CompilerInvocation::createDiagnostics keeps a reference to the ↵Daniel Dunbar2009-12-061-1/+2
| | | | | | DiagnosticOptions, and update callers to make sure they don't pass in a temporary. llvm-svn: 90704
* Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; ↵Daniel Dunbar2009-12-031-13/+4
| | | | | | propogate and simplify. llvm-svn: 90379
* Normalize CIndex/c-index-test/index-test link lines in the hopes it will fixDaniel Dunbar2009-12-022-3/+5
| | | | | | | | *something*. - We really need to fix how LLVM's build systems manage linking. Pretty-please-someone-else-do-this? :) llvm-svn: 90350
* Add ASTUnit::LoadFromCommandLine, which creates an ASTUnit out of a list ofDaniel Dunbar2009-12-021-11/+13
| | | | | | | | | | | | | | (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
* fix build on linuxNuno Lopes2009-12-012-2/+2
| | | | llvm-svn: 90229
* Add ASTUnit::LoadFromCompilerInvocation, which does what it says.Daniel Dunbar2009-12-013-2/+36
| | | | | | | Also, add an -ast-from-source option to index-test which allows index-test to run on source files directly. llvm-svn: 90223
* Move Diagnostic/DiagClient/FileManager from Indexer => ASTUnit.Steve Naroff2009-10-191-4/+3
| | | | | | Removing this shared data should enable clang_createTranslationUnit/clang_createTranslationUnitFromSourceFile to be run from multiple threads (related to <rdar://problem/7303432>). llvm-svn: 84499
* Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:Argyrios Kyrtzidis2009-09-291-4/+4
| | | | | | | -A NamedDecl reference -A TypeLoc llvm-svn: 83095
* Change ASTUnit to take the Diagnostic as an argument, the client should have ↵Daniel Dunbar2009-09-211-2/+2
| | | | | | control of this. llvm-svn: 82430
* Add Diagnostic to Indexer, and have it keep its own FileManager instead of ↵Daniel Dunbar2009-09-211-6/+5
| | | | | | taking an external reference (which was leaked in the case of the CIndex library). llvm-svn: 82429
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-13/+13
| | | | llvm-svn: 81346
* Lot's of little changes to get the C-based indexing API going...Steve Naroff2009-08-281-1/+1
| | | | | | Work in progress. llvm-svn: 80367
* Don't install wpa or index-test tools.Daniel Dunbar2009-08-201-0/+1
| | | | llvm-svn: 79557
* fix a couple of problems with section attributes:Chris Lattner2009-08-102-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add support for ObjC message expressions, in the Analyzer:Argyrios Kyrtzidis2009-07-301-7/+47
| | | | | | | -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
* Support ObjC methods as Entities.Argyrios Kyrtzidis2009-07-291-0/+2
| | | | llvm-svn: 77547
* Add TranslationUnit::getSelectorMap().Argyrios Kyrtzidis2009-07-291-1/+6
| | | | llvm-svn: 77542
* -Introduce the idx::Analyzer class used for getting indexing information, ↵Argyrios Kyrtzidis2009-07-291-53/+38
| | | | | | | | | | like finding references of a declaration across translation units. -Modify the index-test tool to use it. llvm-svn: 77536
* Add getDeclReferenceMap() to the abstract interface of TranslationUnit class.Argyrios Kyrtzidis2009-07-291-1/+3
| | | | llvm-svn: 77530
* Introduce a helper template for the Handler classes and use it insteadArgyrios Kyrtzidis2009-07-291-5/+7
| | | | | | of the iterator of the Indexer class. llvm-svn: 77528
* -Make IndexProvider an abstract interface for getting indexing information.Argyrios Kyrtzidis2009-07-291-9/+9
| | | | | | -Introduce Indexer as an IndexProvider implementation. llvm-svn: 77524
* Change the semantics for Entity.Argyrios Kyrtzidis2009-07-211-5/+3
| | | | | | | | | | 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
* Add '\n' to the end of error message.Argyrios Kyrtzidis2009-07-211-1/+1
| | | | llvm-svn: 76506
* Introduce ASTLocation::getReferencedDecl(), for getting the declaration that ↵Argyrios Kyrtzidis2009-07-181-20/+2
| | | | | | the ASTLocation references. llvm-svn: 76336
* Introduce a redecl_iterator in Decl class, so that we can do a "iterate over ↵Argyrios Kyrtzidis2009-07-181-10/+3
| | | | | | all declarations of the same decl" without knowing the exact type. llvm-svn: 76298
* Handle redeclarations properly at the index-test tool.Argyrios Kyrtzidis2009-07-141-8/+6
| | | | llvm-svn: 75605
* For index-test, if the ASTLocation points at a CallExpr, get a Decl out of it.Argyrios Kyrtzidis2009-07-141-7/+16
| | | | llvm-svn: 75599
* Handle struct fields through the index-test tool.Argyrios Kyrtzidis2009-07-141-1/+13
| | | | llvm-svn: 75596
* Fix comment.Zhongxing Xu2009-07-071-1/+1
| | | | llvm-svn: 74896
* Use the "ASTLocation nomenclature" (instead of the ASTNode one) in ↵Argyrios Kyrtzidis2009-07-061-12/+12
| | | | | | index-test.cpp. llvm-svn: 74863
* Some changes to ASTLocation's methodsArgyrios Kyrtzidis2009-07-061-1/+1
| | | | | | | | -Change hasStmt() to isStmt() -Add isDecl() -Add getSourceRange() llvm-svn: 74862
* Move the 'ResolveLocationInAST' function from the Frontend library to the ↵Argyrios Kyrtzidis2009-07-061-1/+1
| | | | | | | | Index library. Also, cut down its comments; more comments will be added to ASTLocation. llvm-svn: 74860
* Move ASTLocation and DeclReferenceMap from the AST library to the Index library.Argyrios Kyrtzidis2009-07-061-2/+2
| | | | llvm-svn: 74859
* Rename 'ASTNode' -> 'ASTLocation'.Argyrios Kyrtzidis2009-07-061-11/+11
| | | | | | ASTLocation is a much better name for its intended purpose which to represent a "point" into the AST. llvm-svn: 74858
* Make use of the Index library through the index-test tool.Argyrios Kyrtzidis2009-07-053-37/+170
| | | | | | | | | '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
* Make use of ASTNode for return value of clang::ResolveLocationInAST() and in ↵Argyrios Kyrtzidis2009-07-051-18/+14
| | | | | | the index-test tool. llvm-svn: 74798
* Add support for retrieving the Doxygen comment associated with a givenDouglas Gregor2009-07-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions.Chris Lattner2009-06-301-1/+2
| | | | | | | | | | | | 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
* Remove redundant leftover code.Argyrios Kyrtzidis2009-06-291-1/+0
| | | | llvm-svn: 74433
* Check that index-test uses an up-to-date AST file.Argyrios Kyrtzidis2009-06-251-0/+12
| | | | llvm-svn: 74214
* Add some comments and clean-up some leftover code.Argyrios Kyrtzidis2009-06-251-8/+3
| | | | llvm-svn: 74207
* Introduce tools/index-test.Argyrios Kyrtzidis2009-06-253-0/+183
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
OpenPOWER on IntegriCloud