summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
* [preprocessor] Use MacroDirective in the preprocessor callbacks to make ↵Argyrios Kyrtzidis2013-02-241-3/+4
| | | | | | | | available the full information about the macro (e.g if it was imported and where). llvm-svn: 175978
* Revert r175912, "Add support for coldcc to clang" at John's request.Peter Collingbourne2013-02-231-1/+0
| | | | llvm-svn: 175936
* Add support for coldcc to clangPeter Collingbourne2013-02-221-0/+1
| | | | llvm-svn: 175912
* Suppress -Wswitch to unbreak the build.David Blaikie2013-02-221-0/+1
| | | | | | | This may need to be fixed more intelligently - I don't have enough context to be sure what the appropriate fix is right now. llvm-svn: 175902
* [Sema] Semantic analysis for empty-declaration and attribute-declaration.Michael Han2013-02-221-0/+2
| | | | | | | | Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these attributes can be sema checked just as attributes attached to "normal" declarations. llvm-svn: 175900
* Streamify getNameForDiagnostic and remove the string versions of ↵Benjamin Kramer2013-02-221-2/+2
| | | | | | PrintTemplateArgumentList. llvm-svn: 175894
* CIndex.cpp: Appease g++-4.4. "if (Optional<unsigned> Minor = In.getMinor())" ↵NAKAMURA Takumi2013-02-211-2/+4
| | | | | | did not work as expected. llvm-svn: 175711
* Use None rather than Optional<T>() where possible.David Blaikie2013-02-211-2/+2
| | | | llvm-svn: 175705
* Strip 'llvm' from 'llvm::Optional' uses.Ted Kremenek2013-02-212-8/+8
| | | | llvm-svn: 175701
* [preprocessor] Split the MacroInfo class into two separate concepts, ↵Argyrios Kyrtzidis2013-02-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | MacroInfo class for the data specific to a macro definition (e.g. what the tokens are), and MacroDirective class which encapsulates the changes to the "macro namespace" (e.g. the location where the macro name became active, the location where it was undefined, etc.) (A MacroDirective always points to a MacroInfo object.) Usually a macro definition (MacroInfo) is where a macro name becomes active (MacroDirective) but splitting the concepts allows us to better model the effect of modules to the macro namespace (also as a bonus it allows better modeling of push_macro/pop_macro #pragmas). Modules can have their own macro history, separate from the local (current translation unit) macro history; MacroDirectives will be used to model the macro history (changes to macro namespace). For example, if "@import A;" imports macro FOO, there will be a new local MacroDirective created to indicate that "FOO" became active at the import location. Module "A" itself will contain another MacroDirective in its macro history (at the point of the definition of FOO) and both MacroDirectives will point to the same MacroInfo object. Introducing the separation of macro concepts is the first part towards better modeling of module macros. llvm-svn: 175585
* Replace TypeLoc llvm::cast support to be well-defined.David Blaikie2013-02-184-23/+22
| | | | | | | | | | | | | | The TypeLoc hierarchy used the llvm::cast machinery to perform undefined behavior by casting pointers/references to TypeLoc objects to derived types and then using the derived copy constructors (or even returning pointers to derived types that actually point to the original TypeLoc object). Some context is in this thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html Though it's spread over a few months which can be hard to read in the mail archive. llvm-svn: 175462
* libclang: don't store nul-terminated strings as StringRefs,Dmitri Gribenko2013-02-182-16/+15
| | | | | | | | | | if the nul-terminatedness property is important for clients. Also, don't return the same CXString multiple times. This did not create a correctness issue in practice because the CXString was of an CXS_Unmanaged kind, and destruction was a no-op. llvm-svn: 175455
* libclang: remove reinterpret_casts by using SourceLocation::getPtrEncodingDmitri Gribenko2013-02-161-14/+14
| | | | llvm-svn: 175333
* libclang: add clang_getTypeSpelling(CXType CT)Dmitri Gribenko2013-02-152-0/+16
| | | | | | | | | Adds a function clang_getTypeSpelling(CXType CT) that returns a CXString containing the underlying type. Patch by Ben Gertzfield. llvm-svn: 175299
* libclang: remove reinterpret_casts by using SourceLocation::getFromPtrEncodingDmitri Gribenko2013-02-141-24/+12
| | | | | | directly instead of casting a pointer to an integer llvm-svn: 175206
* Use 'RC_XBS' instead of 'RC_BUILDIT' to catch all times when it's built in ↵Bill Wendling2013-02-131-1/+1
| | | | | | the Apple way. llvm-svn: 175070
* [libclang] Fix annotation of a range where the begin or end locationArgyrios Kyrtzidis2013-02-131-9/+23
| | | | | | | | | is inside a macro argument. Previously we would give up and not annotate anything in the range. rdar://11891550 llvm-svn: 175062
* libclang: use CXCursor getters to simplify codeDmitri Gribenko2013-02-091-3/+2
| | | | llvm-svn: 174809
* [libclang] Attribute visitation happens out-of-source-order, make sureArgyrios Kyrtzidis2013-02-081-8/+23
| | | | | | | | | we annotate properly when there is an attribute and not skip type specs if the attribute is after the declaration. rdar://13129077 llvm-svn: 174689
* libclang: reduce CXString abuseDmitri Gribenko2013-02-071-25/+20
| | | | | | | | | ContainerUSR is not really a CXString, but it should own the underlying memory buffer. Thus, it is better to change the type to std::string. This will not introduce extra copying overhead, since the workaround that is being removed was already making a copy. llvm-svn: 174647
* libclang: CursorVisitor::VisitBuiltinTypeLoc(): Add OCLSampler. [-Wswitch]NAKAMURA Takumi2013-02-071-0/+1
| | | | llvm-svn: 174606
* Add OpenCL samplers as Clang builtin types and check sampler related ↵Guy Benyei2013-02-071-0/+1
| | | | | | restrictions. llvm-svn: 174601
* Comment to XML conversion: replace string comparison with command ID comparisonDmitri Gribenko2013-02-031-3/+8
| | | | llvm-svn: 174290
* libclang: wrap CXString implementation into 'namespace cxstring'Dmitri Gribenko2013-02-031-19/+24
| | | | | | This removes quite a few 'cxstring::' qualifications where they are obvious. llvm-svn: 174286
* libclang: remove 'using namespace cxstring'Dmitri Gribenko2013-02-0310-13/+3
| | | | llvm-svn: 174285
* libclang: migrate IndexingDeclVisitor to ConstDeclVisitorDmitri Gribenko2013-02-031-36/+38
| | | | llvm-svn: 174284
* libclang: remove unneeded const_castDmitri Gribenko2013-02-031-1/+1
| | | | llvm-svn: 174283
* libclang: migrate USRGenerator to ConstDeclVisitorDmitri Gribenko2013-02-031-59/+62
| | | | llvm-svn: 174281
* libclang: remove unneeded const_castsDmitri Gribenko2013-02-032-4/+3
| | | | llvm-svn: 174280
* libclang: introduce cxstring::{createRef,createDup} for StringRefsDmitri Gribenko2013-02-0211-90/+111
| | | | | | Also migrate all clients from the old API. llvm-svn: 174263
* libclang: introduce cxstring::{createRef,createDup} for C stringsDmitri Gribenko2013-02-028-181/+200
| | | | | | Also migrate all clients from the old API. llvm-svn: 174238
* Comment parsing: improve the fidelity of XML output for many block commandsDmitri Gribenko2013-02-011-3/+42
| | | | | | | | | | | | | | This change introduces a 'kind' attribute for the <Para> tag, that captures the kind of the parent block command. For example: \todo Meow. used to be just <Para>Meow.</Para>, but now it is <Para kind="todo">Meow.</Para> llvm-svn: 174216
* libclang: document the purpose of createNull()Dmitri Gribenko2013-02-011-0/+2
| | | | llvm-svn: 174195
* libclang: add comments for CXStringFlagDmitri Gribenko2013-02-011-1/+12
| | | | llvm-svn: 174194
* libclang: itroduce cxstring::createEmpty()Dmitri Gribenko2013-02-0110-43/+53
| | | | llvm-svn: 174174
* libclang: introduce cxstring::createNull()Dmitri Gribenko2013-02-016-26/+36
| | | | llvm-svn: 174173
* [Comment parsing] Add support for recognizingFariborz Jahanian2013-01-311-2/+15
| | | | | | | | \headerfile command and representing it in an xml document. Patch reviewed by Dmitri Gribenko. // rdar://12397511 llvm-svn: 174109
* Attempt to fix Windows build breakage.Evgeniy Stepanov2013-01-311-1/+2
| | | | llvm-svn: 174060
* Allow the computation of the base priority for a declaration code completion ↵Douglas Gregor2013-01-311-1/+1
| | | | | | result to consider the completion context llvm-svn: 174037
* libclang: refactor CXStringPool: make it a classDmitri Gribenko2013-01-265-43/+48
| | | | | | | We are not exposing the pool or string buffers to libclang users, so no need to maintain a procedural interface. llvm-svn: 173595
* libclang: type safety for CXTranslationUnitImpl::CIdxDmitri Gribenko2013-01-264-6/+6
| | | | llvm-svn: 173590
* libclang: type safety for CXTranslationUnitImpl::FormatContextDmitri Gribenko2013-01-263-15/+10
| | | | llvm-svn: 173589
* libclang: some type safety for CXTranslationUnitImpl's internalsDmitri Gribenko2013-01-263-10/+13
| | | | | | | There is no reason to store pointers as 'void*' in CXTranslationUnitImpl, since it does not affect libclang ABI. llvm-svn: 173588
* libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)Dmitri Gribenko2013-01-2614-67/+72
| | | | | | into a getter cxtu::getASTUnit(TU) llvm-svn: 173585
* libclang: make getCursorParentDecl() return 'const Decl *'Dmitri Gribenko2013-01-263-4/+4
| | | | llvm-svn: 173584
* libclang: change getCursorAttr() to return 'const Attr *'Dmitri Gribenko2013-01-263-7/+7
| | | | llvm-svn: 173583
* libclang: make getCursorStmt() and getCursorExpr() return const pointersDmitri Gribenko2013-01-264-169/+180
| | | | | | Also change EnqueueVisitor to use ConstStmtVisitor as a consequence. llvm-svn: 173577
* [libclang] Introduce clang_getFileUniqueID which returns a structArgyrios Kyrtzidis2013-01-262-0/+16
| | | | | | | | | | | for a CXFile containing device/inode/modification time. Intended to be useful as a key associated with a unique file across an indexing session. rdar://13091837 llvm-svn: 173559
* libclang: change return type of getCursorDecl() to 'const Decl *'Dmitri Gribenko2013-01-238-159/+167
| | | | llvm-svn: 173278
* Remove uneeded castsDmitri Gribenko2013-01-232-6/+4
| | | | llvm-svn: 173269
OpenPOWER on IntegriCloud