summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
* Audit DeclPrinter with -ast-dump on Cocoa.h andFariborz Jahanian2012-12-191-1/+1
| | | | | | | | | fix any bad objectiveC syntax coming out of DeclPrinter. This is on going. Also, introduce a new PrintPolicy and use it as needed when declaration tag is to be produced via DeclPrinter. llvm-svn: 170606
* Add a missing 'else'. Found by grep '} if'Dmitri Gribenko2012-12-191-1/+1
| | | | | | | No testcase because this did not affect correctness: a declaration can only be ClassTemplateDecl or a FunctionTemplateDecl, not both. llvm-svn: 170565
* Improve on header comment suggested by James Dennet.Fariborz Jahanian2012-12-191-2/+2
| | | | llvm-svn: 170555
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-1/+1
| | | | | | single attribute in the future. llvm-svn: 170500
* Simplify logic to use SourceManager::getFileLoc(), per Argyrios's feedback.Ted Kremenek2012-12-191-8/+1
| | | | llvm-svn: 170487
* fixes a doxygen comment.Fariborz Jahanian2012-12-191-1/+3
| | | | llvm-svn: 170485
* Increas number of iterations before a new libclang format objectFariborz Jahanian2012-12-191-1/+1
| | | | | | is created to 1000. llvm-svn: 170481
* Some code refactoring per Dimitri's comment.Fariborz Jahanian2012-12-192-41/+40
| | | | llvm-svn: 170478
* Have clang_getSpellingLocation() use the same logic as DiagnosticRenderer ↵Ted Kremenek2012-12-181-8/+6
| | | | | | | | | | | | for plowing through macros. This fixes a subtle bug reported in <rdar://problem/12584554> where a double-nested macro could lead to an incorrect fixit location with live issues. This fix also uncovers a bunch of subtle bugs in our indexer test cases which are now fixed (mostly around source ranges for attributes). llvm-svn: 170468
* This is the libclang patch providing minimal API toFariborz Jahanian2012-12-186-5/+153
| | | | | | | | | | use clang's formatter. Currently, formatter is used to format declaration tags for xml comments. Since formatter is in flux and its change will break several of the clang comment tests, only a single tests is formatted using this facility. Doug has reviewed and approved it for check-in. llvm-svn: 170467
* Re-commit r170428 changes with Linux style file endings.Guy Benyei2012-12-182-0/+12
| | | | | | Add OpenCL images as clang builtin types. llvm-svn: 170432
* Revert changes from r170428, as I accidentally changed the line endings of ↵Guy Benyei2012-12-182-7087/+7075
| | | | | | these files to Windows style. llvm-svn: 170431
* Add OpenCL images as clang builtin types.Guy Benyei2012-12-182-7075/+7087
| | | | llvm-svn: 170428
* [libclang] Make sure tokens from preprocessor directives are annotated as such,Argyrios Kyrtzidis2012-12-121-10/+5
| | | | | | | | even if the directive is inside a declaration. Fixes rdar://11548788 & http://llvm.org/PR12970 llvm-svn: 169949
* [libclang] Declarations inside anonymous namespaces have internal linkage soArgyrios Kyrtzidis2012-12-071-7/+1
| | | | | | | | | their USR should contain a location. This uniques them from other declarations with the same name but in different translation units. rdar://10546541 llvm-svn: 169647
* [libclang] Introduce a new indexing mode where we skip function bodiesArgyrios Kyrtzidis2012-12-063-18/+299
| | | | | | | | | | | | | | | that were already parsed in the same "indexing session". An indexing session is defined as using the same CXIndexAction object for multiple clang_indexSourceFile calls. Passing CXIndexOpt_SkipParsedBodiesInSession as an indexing option will enable the mode where we try to skip bodies that were already parsed in another translation unit. If a function's body was skipped, the "flags" field in the CXIdxDeclInfo structure will have "CXIdxDeclFlag_Skipped" bit was set. llvm-svn: 169539
* libclang: Add a function to libclang for retrieving the bit width valueDmitri Gribenko2012-12-042-0/+16
| | | | | | Patch by Jyun-Yan You. llvm-svn: 169276
* Sort #include lines for tools/...Chandler Carruth2012-12-0422-72/+54
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* [libclang] Avoid copying the CompileCommand related strings when wrapping ↵Argyrios Kyrtzidis2012-12-041-2/+2
| | | | | | them to a CXString. llvm-svn: 169227
* Introduce CompilationDatabase::getAllCompileCommands() that returns allArgyrios Kyrtzidis2012-12-042-0/+12
| | | | | | compile commands of the database and expose it via the libclang API. llvm-svn: 169226
* [libclang] Remove WorkingDir field from CIndexer, it has been rendered useless.Argyrios Kyrtzidis2012-11-272-5/+0
| | | | | | No functionality change. llvm-svn: 168738
* Make helpers static/anonymous.Benjamin Kramer2012-11-221-1/+4
| | | | llvm-svn: 168500
* Revert r167801, "[preprocessor] When #including something that contributes noDaniel Dunbar2012-11-131-2/+0
| | | | | | tokens at all,". This change broke External/Nurbs in LLVM test-suite. llvm-svn: 167858
* [preprocessor] When #including something that contributes no tokens at all,Argyrios Kyrtzidis2012-11-131-0/+2
| | | | | | | | | don't recursively continue lexing. This avoids a stack overflow with a sequence of many empty #includes. rdar://11988695 llvm-svn: 167801
* Remove completely irrelevant code from USR generation.Ted Kremenek2012-11-061-29/+4
| | | | | | | | | | | | | | Thanks to Richard Smith for pointing this out. This code stopped serving its purpose during r103212 in a refactoring. My initial fix was to add back the logic to abort the USR generation for InternalLinkage, but enough tests broke suspiciously that I fear that USR generation for cursors with InternalLinkage is now expected by some clients (where it wasn't the case when the refactoring took place). I don't own this code anymore and have not looked at it for some time, but clearly this code is dead and can be removed pending further review on the proper logic here. llvm-svn: 167442
* [libclang] Introduce clang_Cursor_getReceiverType which returns the CXType forArgyrios Kyrtzidis2012-11-012-0/+14
| | | | | | | | the receiver of an ObjC message expression. rdar://12578643 llvm-svn: 167201
* Add missing emacs major mode marker.Nick Lewycky2012-10-291-1/+1
| | | | llvm-svn: 166914
* Fix name of this file.Nick Lewycky2012-10-291-1/+1
| | | | llvm-svn: 166913
* Add missing emacs major mode marker.Nick Lewycky2012-10-291-1/+1
| | | | llvm-svn: 166912
* Comment to XML conversion: avoid memory allocation while pretty-printing theDmitri Gribenko2012-10-251-18/+22
| | | | | | declaration. llvm-svn: 166707
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-234-14/+18
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* [libclang] Add an environment variable to disable thread background ↵Argyrios Kyrtzidis2012-10-231-0/+3
| | | | | | priotity, for testing llvm-svn: 166466
* Remove const_casts by propagating constness down to called functions.Dmitri Gribenko2012-10-191-9/+7
| | | | llvm-svn: 166287
* [doc parsing] use getParamName to access parameter Fariborz Jahanian2012-10-181-10/+15
| | | | | | | for current(rewritten) comment and getParamNameAsWritten to access param name coming with \param marker. llvm-svn: 166231
* libclang/CXComment.cpp: Fix abuse of StringRef.NAKAMURA Takumi2012-10-181-1/+1
| | | | llvm-svn: 166163
* [libclang] Invoke a ppIncludedFile callback when indexing implicit module ↵Argyrios Kyrtzidis2012-10-183-19/+15
| | | | | | imports. llvm-svn: 166161
* [Doc parsing]: This patch adds <Declaration> tag to Fariborz Jahanian2012-10-171-1/+20
| | | | | | | | | | | XML comment for declarations which pretty-prints declaration. I had to XFAIL one test annotate-comments.cpp. This test is currently unmaintainable as written. Dmitri G., can you see what we can do about this test. We should change this test such that adding a new tag does not wreck havoc to the test. llvm-svn: 166130
* Add pnaclcall convention to Native Client targets.Derek Schuff2012-10-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Because PNaCl bitcode must be target-independent, it uses some different bitcode representations from other targets (e.g. byval and sret for structures). This means that without additional type information, it cannot meet some native ABI requirements for some targets (e.g. passing structures containing unions by value on x86-64). To allow generation of code which uses the correct native ABIs, we also support triples such as x86_64-nacl, which uses target-dependent IR (as opposed to le32-nacl, which uses byval and sret). To allow interoperation between the two types of code, this patch adds a calling convention attribute to be used in code compiled with the target-dependent triple, which will generate code using the le32-style bitcode. This calling convention does not need to be explicitly supported in the backend because it determines bitcode representation rather than native conventions (the backend just needs to undersand how to handle byval and sret for the Native Client OS). This patch implements __attribute__((pnaclcall)) to generate calls in bitcode according to the le32 bitcode conventions, an attribute which is accepted by any Native Client target, but issues a warning otherwise. llvm-svn: 166065
* Fixes location of overriding declaration with no commentFariborz Jahanian2012-10-151-1/+1
| | | | | | of their own. llvm-svn: 165972
* structured document comment: patch to provide comment for overriding functionFariborz Jahanian2012-10-151-3/+3
| | | | | | | template when comment is comming from overridden declaration. // rdar://12378793 llvm-svn: 165953
* search for overridden methods with comment when overriding methodFariborz Jahanian2012-10-111-2/+2
| | | | | | | has none of its own. Factor in Doug's comments. // rdar://12378793 llvm-svn: 165771
* Remove pointless classof()'s.Sean Silva2012-10-112-12/+0
| | | | | | | Updates to llvm/Support/Casting.h have rendered these classof()'s irrelevant. llvm-svn: 165770
* [libclang] Improve AST serialization done by ASTUnit::Save().Argyrios Kyrtzidis2012-10-111-0/+2
| | | | | | | | | The ASTUnit needs to initialize an ASTWriter at the beginning of parsing to fully handle serialization of a translation unit that imports modules. Do this by introducing an option to enable it, which corresponds to CXTranslationUnit_ForSerialization on the C API side. llvm-svn: 165717
* [Doc parsing] This patch searches overridden objc/c++Fariborz Jahanian2012-10-101-15/+22
| | | | | | | | | | methods looking for documentation on a particular base class inherited by any method that overrides the base class. In case of redeclaration, as when objc method is defined in the implementation, it also looks up for documentation in class/class extension being redeclared. llvm-svn: 165643
* Rename ObjCMethodDecl::isSynthesized to isPropertyAccessor.Jordan Rose2012-10-102-5/+5
| | | | | | | | | | | | | This more accurately reflects its use: this flag is set when a method matches the getter or setter name for a property in the same class, and does not actually specify whether or not the definition of the method will be synthesized (either implicitly or explicitly with @synthesize). This renames the setter and backing field as well, and changes the (soon-to-be-obsolete?) XML dump format to use 'property_accessor' instead of 'synthesized'. llvm-svn: 165626
* Place temporary LTO files into their own subdirectory.Bill Wendling2012-10-101-1/+1
| | | | llvm-svn: 165600
* Disable the preprocessing record when indexing a source fileArgyrios Kyrtzidis2012-10-101-0/+3
| | | | | | and modules are not enabled. llvm-svn: 165593
* When indexing a module file, for the ppIncludedFile callback giveArgyrios Kyrtzidis2012-10-101-2/+9
| | | | | | | an invalid location if the location points to the synthetic buffer for the module input. llvm-svn: 165592
* Revert "Use a special path to place the .o files in."Bob Wilson2012-10-091-2/+1
| | | | | | This reverts commit 165429 in an attempt to get our buildbots going. llvm-svn: 165573
* Move the logic that searches for overridden methods from libclang toArgyrios Kyrtzidis2012-10-091-180/+6
| | | | | | ASTContext so that it can be widely available. llvm-svn: 165473
OpenPOWER on IntegriCloud