summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* [libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the ↵Argyrios Kyrtzidis2013-04-182-0/+30
| | | | | | | | written attributes in a property declaration. rdar://13684512 llvm-svn: 179803
* [libclang] Report parameter array types as written in source, not decayed to ↵Argyrios Kyrtzidis2013-04-181-3/+9
| | | | | | | | | pointer types. Patch by Doug. rdar://13684618 llvm-svn: 179769
* Sema for Captured StatementsTareq A. Siraj2013-04-162-3/+15
| | | | | | | | | | | | | Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic analysis. Currently captures all variables by reference. TODO: templates Author: Ben Langmuir <ben.langmuir@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D433 llvm-svn: 179618
* Implement CapturedStmt ASTTareq A. Siraj2013-04-162-1/+5
| | | | | | | | | | | | | | | CapturedStmt can be used to implement generic function outlining as described in http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html. CapturedStmt is not exposed to the C api. Serialization and template support are pending. Author: Wei Pan <wei.pan@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D370 llvm-svn: 179615
* Basic support for Microsoft property declarations andJohn McCall2013-04-167-0/+27
| | | | | | | | references thereto. Patch by Tong Shen! llvm-svn: 179585
* [libclang] Introduce clang_Location_isInSystemHeader to check if a location ↵Argyrios Kyrtzidis2013-04-122-0/+12
| | | | | | | | resides in a system header. This is a modified patch provided from Mikołaj Siedlarek! llvm-svn: 179384
* [libclang] Have clang_getCXXAccessSpecifier() also return the access control ↵Argyrios Kyrtzidis2013-04-111-1/+1
| | | | | | | | of a C++ declaration within its parent scope. Suggested by Stefan Seefeld. llvm-svn: 179297
* [libclang] Expose record layout info via new libclang functions:Argyrios Kyrtzidis2013-04-112-0/+124
| | | | | | | | | | | clang_Type_getAlignOf clang_Type_getSizeOf clang_Type_getOffsetOf clang_Cursor_isBitField Patch by Loïc Jaquemet! llvm-svn: 179251
* [libclang] In cxtu::getASTUnit(), check for a null CXTranslationUnit.Argyrios Kyrtzidis2013-04-091-0/+2
| | | | llvm-svn: 179121
* [libclang] Fix cursor visitation to not ignore template arguments in ↵Argyrios Kyrtzidis2013-04-051-0/+14
| | | | | | | | out-of-line member functions. rdar://13535645 llvm-svn: 178911
* [libclang] Add some checks to make sure the given CXTranslationUnit is not ↵Argyrios Kyrtzidis2013-04-041-1/+7
| | | | | | null, before using it. llvm-svn: 178800
* [libclang] Make clang_Cursor_getArgument work with call-exprs.Argyrios Kyrtzidis2013-04-011-0/+18
| | | | | | Patch by Matthias Kleine! llvm-svn: 178475
* [libclang] If libclang logging is enabled, print all compiler diagnostics to ↵Argyrios Kyrtzidis2013-03-291-3/+7
| | | | | | stderr instead of capturing them. llvm-svn: 178373
* [cmake] Add clang-headers as a dependency of libclang and if we have to copy ↵Argyrios Kyrtzidis2013-03-291-2/+2
| | | | | | | | them for the IDE case, also create a symlink inside the libclang.dylib directory. llvm-svn: 178372
* Update the error handing static functions for r178161.Chad Rosier2013-03-271-1/+2
| | | | | | Part of rdar://13296693 llvm-svn: 178162
* [Preprocessor/Modules] Separate the macro directives kinds into their own ↵Argyrios Kyrtzidis2013-03-261-5/+7
| | | | | | | | | | | | | | | | MacroDirective's subclasses. For each macro directive (define, undefine, visibility) have a separate object that gets chained to the macro directive history. This has several benefits: -No need to mutate a MacroDirective when there is a undefine/visibility directive. Stuff like PPMutationListener become unnecessary. -No need to keep extra source locations for the undef/visibility locations for the define directive object (which is the majority of the directives) -Much easier to hide/unhide a section in the macro directive history. -Easier to track the effects of the directives across different submodules. llvm-svn: 178037
* OpenMP threadprivate directive parsing and semantic analysisAlexey Bataev2013-03-222-0/+10
| | | | llvm-svn: 177705
* [libclang] Modify clang_getCursorType to be able to handle a function ↵Argyrios Kyrtzidis2013-03-181-0/+2
| | | | | | template decl. llvm-svn: 177359
* [Modules] Resolve top-headers of modules lazily.Argyrios Kyrtzidis2013-03-131-7/+13
| | | | | | | | | | | This allows resolving top-header filenames of modules to FileEntries when we need them, not eagerly. Note that that this breaks ABI for libclang functions clang_Module_getTopLevelHeader / clang_Module_getNumTopLevelHeaders but this is fine because they are experimental and not widely used yet. llvm-svn: 176975
* [libclang] Change clang_findReferencesInFile and clang_findIncludesInFile to ↵Argyrios Kyrtzidis2013-03-081-25/+25
| | | | | | | | return an enum, as suggested by Jordan. llvm-svn: 176732
* [libclang] Modify clang_findReferencesInFile and clang_findIncludesInFile to ↵Argyrios Kyrtzidis2013-03-083-59/+68
| | | | | | | | | | | return a value. Possible values are: 1 : if a parameter was invalid -1 : if the callback returned CXVisit_Break, otherwise returns 0. llvm-svn: 176716
* [libclang] Introduce clang_findIncludesInFile, that can be used to retrieve ↵Argyrios Kyrtzidis2013-03-082-0/+108
| | | | | | | | | all #import/#include directives in a specific file. It passes to the visitor, that the caller provides, CXCursor_InclusionDirective cursors for all the include directives in a particular file. llvm-svn: 176682
* [libclang] When calling the function of CXCursorAndRangeVisitor, don't forget toArgyrios Kyrtzidis2013-03-081-4/+6
| | | | | | stop visitation if it returns CXVisit_Break. llvm-svn: 176681
* [libclang] Add Logger::operator<< overloads for CXCursor and FileEntry.Argyrios Kyrtzidis2013-03-083-0/+18
| | | | llvm-svn: 176680
* [libclang] When logging a CXTranslationUnit that came from an AST file, ↵Argyrios Kyrtzidis2013-03-051-0/+2
| | | | | | print out the filename. llvm-svn: 176511
* Fix typos: [Dd]iagnosic -> [Dd]iagnosticStefanus Du Toit2013-03-011-1/+1
| | | | | | These all appear in comments or (ironically) diagnostics output. llvm-svn: 176383
* doxygen command. Add 'attention' command to list of similarFariborz Jahanian2013-02-261-0/+1
| | | | | | doxygen commands. // rdar://12379053 llvm-svn: 176127
* [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
OpenPOWER on IntegriCloud