summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Update target_link_libraries() and LLVM_LINK_COMPONENTS for each ↵NAKAMURA Takumi2013-12-101-14/+6
| | | | | | CMakeLists.txt. llvm-svn: 196916
* [libclang] Rename CXSkippedRanges to CXSourceRangeList to make it more ↵Argyrios Kyrtzidis2013-12-062-7/+7
| | | | | | | | future-proof. Suggested by Alp Toker. llvm-svn: 196591
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-1/+1
| | | | llvm-svn: 196510
* [libclang] Record ranges skipped by the preprocessor and expose them with ↵Argyrios Kyrtzidis2013-12-052-0/+43
| | | | | | | | libclang. Patch by Erik Verbruggen! llvm-svn: 196487
* Add an AdjustedType sugar node for adjusting calling conventionsReid Kleckner2013-12-052-0/+12
| | | | | | | | | | | | | | | | Summary: In general, this type node can be used to represent any type adjustment that occurs implicitly without losing type sugar. The immediate use of this is to adjust the calling conventions of member function pointer types without breaking template instantiation. Fixes PR17996. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2332 llvm-svn: 196451
* Fix method/variable name typosAlp Toker2013-12-031-2/+2
| | | | llvm-svn: 196214
* Fix typo: s/Occurence/Occurrence/Alp Toker2013-11-302-5/+5
| | | | | | This is a private class member so the fix shouldn't impact external projects. llvm-svn: 195985
* [libclang] Check for LIBCLANG_DISABLE_CRASH_RECOVERY before enabling crash ↵Argyrios Kyrtzidis2013-11-271-6/+2
| | | | | | | | recovery. Suggested by Alp Toker. llvm-svn: 195829
* [libclang] Make sure we don't access past the tokens buffer while token ↵Argyrios Kyrtzidis2013-11-271-7/+29
| | | | | | | | annotation. Also disable crash recovery using 'LIBCLANG_DISABLE_CRASH_RECOVERY' environment variable. llvm-svn: 195819
* Remove a whole lot of unused variablesAlp Toker2013-11-271-1/+0
| | | | | | | There are about 30 removed in this patch, generated by a new FixIt I haven't got round to submitting yet. llvm-svn: 195814
* Work around a bug in old gcc on the FreeBSD bot, which complains aboutDmitri Gribenko2013-11-141-3/+3
| | | | | | ambiguity between index() function and clang::index namespace. llvm-svn: 194638
* libclang does not depend directly on clangFormat; but clangIndex doesDmitri Gribenko2013-11-131-1/+0
| | | | llvm-svn: 194611
* Documentation parsing: move comment-to-XML conversion routines to libIndexDmitri Gribenko2013-11-135-1193/+28
| | | | llvm-svn: 194610
* Make inline functions in a header file static.Dmitri Gribenko2013-11-131-6/+6
| | | | llvm-svn: 194603
* Add an optional mapping from source paths to source contents.Manuel Klimek2013-11-131-0/+36
| | | | | | | | This allows compilation database implementations for distributed build systems to hand all data to the client to make parsing independent of the file system. llvm-svn: 194571
* Documentation parsing: add support for \throws \throw \exception commandsDmitri Gribenko2013-11-121-0/+13
| | | | llvm-svn: 194521
* [libclang] Some changes on the linker options for libclang on a CMake build.Argyrios Kyrtzidis2013-11-061-3/+11
| | | | | | | | - Use the 'libclang.exports' file. - Pass -Wl,-current_version - Set install name to "@rpath" llvm-svn: 194134
* It is no longer necessary to opt out of pretty stack traces.Filip Pizlo2013-11-041-5/+0
| | | | llvm-svn: 193973
* Store a TypeArgument on an attribute as a TypeSourceInfo*, rather than as aRichard Smith2013-10-312-5/+8
| | | | | | QualType with a SourceLocation stashed alongside. llvm-svn: 193803
* Factor out custom parsing for iboutletcollection and vec_type_hint attributesRichard Smith2013-10-312-4/+4
| | | | | | | | | into a separate "parse an attribute that takes a type argument" codepath. This results in both codepaths being a lot cleaner and simpler, and fixes some bugs where the type argument handling bled into the expression argument handling and caused us to both accept invalid and reject valid attribute arguments. llvm-svn: 193731
* Use LLVMLibsOptions intead of LDFLAGS when setting the libclang soname. This ↵Sylvestre Ledru2013-10-291-1/+1
| | | | | | allows 'make LDFLAGS=foo' to be set correctly (and matches the way it is done with libllvm and liblldb) llvm-svn: 193607
* Rename some functions for consistency.Rafael Espindola2013-10-171-4/+4
| | | | | | Every other function in Redeclarable.h was using Decl instead of Declaration. llvm-svn: 192900
* Add llvm_unreachable to pacify GCC's dropping off non-void function warning.Benjamin Kramer2013-10-151-1/+4
| | | | | | + 80 cols fix. llvm-svn: 192728
* [libclang] When querying for the availability of an enumerator, pick up the ↵Argyrios Kyrtzidis2013-10-151-40/+75
| | | | | | | | availability from the enum declaration. rdar://14789001. llvm-svn: 192718
* [libclang] Introduce clang_Type_getCXXRefQualifier whichexposes ↵Argyrios Kyrtzidis2013-10-112-0/+19
| | | | | | | | ref-qualifier information of function type. Patch by Che-Liang Chiou! llvm-svn: 192493
* [libclang] Introduce clang_Type_getClassType which returns the class type of ↵Argyrios Kyrtzidis2013-10-032-0/+17
| | | | | | | | a member pointer type. Patch by Che-Liang Chiou! llvm-svn: 191906
* [OpenMP] Added parsing and semantic analysis for firstprivate clauseAlexey Bataev2013-10-012-0/+11
| | | | llvm-svn: 191730
* [libclang] Provide location for attributes and expose 'packed' attribute.Argyrios Kyrtzidis2013-09-252-0/+13
| | | | | | Patch by Loïc Jaquemet! llvm-svn: 191345
* [OPENMP] Bug fixes and improvements.Alexey Bataev2013-09-242-15/+25
| | | | | | | | 1. Fixed constructor of shared clause. 2. Some macros for clauses processing are replaced by private template methods. 3. Additional checks in sema analysis of OpenMP clauses. llvm-svn: 191265
* Fix array_pod_sort predicates after LLVM change.Benjamin Kramer2013-09-221-12/+3
| | | | llvm-svn: 191176
* Add the intrinsic __builtin_convertvectorHal Finkel2013-09-182-0/+2
| | | | | | | | | | | | | | | | | | LLVM supports applying conversion instructions to vectors of the same number of elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to cause such instructions to be generated when using builtin vector types. C-style casting on vectors is already defined in terms of bitcasts, and so cannot be used for these conversions as well (without leading to a very confusing set of semantics). As a result, this adds a __builtin_convertvector intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is intended to aid the creation of vector intrinsic headers that create generic IR instead of target-dependent intrinsics (in other words, this is a generic _mm_cvtepi32_ps). As noted in the documentation, the action of __builtin_convertvector is defined in terms of the action of a C-style cast on each vector element. llvm-svn: 190915
* [libclang] Don't report a DecayedType as "unexposed", report it as the ↵Argyrios Kyrtzidis2013-09-161-0/+5
| | | | | | | | original (as written) type. Patch by Anders Waldenborg! llvm-svn: 190796
* Remove unnecessary inclusion of Sema.hDavid Blaikie2013-09-135-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let me tell you a tale... Within some twisted maze of debug info I've ended up implementing an insane man's Include What You Use device. When the debugger emits debug info it really shouldn't, I find out why & then realize the code could be improved too. In this instance CIndexDiagnostics.cpp had a lot more debug info with Clang than GCC. Upon inspection a major culprit was all the debug info describing clang::Sema. This was emitted because clang::Sema is befriended by DiagnosticEngine which was rightly required, but GCC doesn't emit debug info for friends so it never emitted anything for Clang. Clang does emit debug info for friends (will be fixed/changed to reduce debug info size). But why didn't Clang just emit a declaration of Sema if this entire TU didn't require a definition? 1) Diagnostic.h did the right thing, only using a declaration of Sema and not including Sema.h at all. 2) Some other dependency of CIndexDiagnostics.cpp didn't do the right thing. ASTUnit.h, only needing a declaration, still included Sema.h (hence this commit which removes that include and adds the necessary includes to the cpp files that were relying on this) 3) -flimit-debug-info didn't save us because of EnterExpressionEvaluationContext, defined inline in Sema.h which fires the "requiresCompleteType" check/flag (since it uses nested types from Sema and calls Sema member functions) and thus, if debug info is ever emitted for the type, the whole type is emitted and not just a declaration. Improving -flimit-debug-info to account for this would be... hard. Modifying the code so that's not 'required to be complete' might be possible, but probably only by moving EnterExpressionEvaluationContext either into Sema, or out of Sema.h. That might be a bit too much of a contortion to be bothered with. Also, this is only one of the cases where emitting debug info for friends caused us to emit a lot more debug info (this change reduces Clang's DWO size by 0.93%, dropping friends entirely reduces debug info by 3.2%) - I haven't hunted down the other cases, but I assume they might be similar (Sema or something like it). IWYU or a similar tool might help us reduce build times a bit, but analyzing debug info to find these differences isn't worthwhile. I'll take the 3.2% win, provide this small improvement to the code itself, and move on. llvm-svn: 190715
* [libclang] In clang_getLocation, check that the provided line/column is valid.Argyrios Kyrtzidis2013-09-121-0/+2
| | | | | | rdar://14971432 llvm-svn: 190568
* Fix 2 cases of uninitialized reads of an invalid PresumedLoc.Evgeniy Stepanov2013-09-111-13/+15
| | | | | | | | | The code in CGExpr was added back in 2012 (r165536) but not exercised in tests until recently. Detected on the MemorySanitizer bootstrap bot. llvm-svn: 190521
* OpenMP: Data-sharing attributes analysis and clause 'shared' (fixed test ↵Alexey Bataev2013-09-062-0/+9
| | | | | | threadprivate_messages.cpp) llvm-svn: 190183
* Remove unused typedef.Eric Christopher2013-09-031-1/+0
| | | | llvm-svn: 189844
* Revert "OpenMP: Data-sharing attributes analysis and clause 'shared'"Rafael Espindola2013-09-032-9/+0
| | | | | | | | This reverts commit r189795. threadprivate_messages.cpp is faling on windows. llvm-svn: 189811
* OpenMP: Data-sharing attributes analysis and clause 'shared'Alexey Bataev2013-09-032-0/+9
| | | | llvm-svn: 189795
* Add ms_abi and sysv_abi attribute handling.Charles Davis2013-08-301-0/+2
| | | | | | Based on a patch by Benno Rice! llvm-svn: 189644
* Delete CC_Default and use the target default CC everywhereReid Kleckner2013-08-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Makes functions with implicit calling convention compatible with function types with a matching explicit calling convention. This fixes things like calls to qsort(), which has an explicit __cdecl attribute on the comparator in Windows headers. Clang will now infer the calling convention from the declarator. There are two cases when the CC must be adjusted during redeclaration: 1. When defining a non-inline static method. 2. When redeclaring a function with an implicit or mismatched convention. Fixes PR13457, and allows clang to compile CommandLine.cpp for the Microsoft C++ ABI. Excellent test cases provided by Alexander Zinenko! Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1231 llvm-svn: 189412
* Use pop_back_val() instead of both back() and pop_back().Robert Wilhelm2013-08-231-2/+1
| | | | | | No functionality change intended. llvm-svn: 189112
* Split isFromMainFile into two functions.Eli Friedman2013-08-221-1/+1
| | | | | | | | | Basically, isInMainFile considers line markers, and isWrittenInMainFile doesn't. Distinguishing between the two is useful when dealing with files which are preprocessed files or rewritten with -frewrite-includes (so we don't, for example, print useless warnings). llvm-svn: 188968
* Remove more uses of 'index' as namespace scope.Argyrios Kyrtzidis2013-08-211-6/+6
| | | | | | Follow up to r188850. llvm-svn: 188854
* Avoid using the 'index' namespace as scope.Argyrios Kyrtzidis2013-08-211-8/+9
| | | | | | This should fix the bogus ambiguous reference errors reported by gcc 4.2.1 that the FreeBSD bot is using. llvm-svn: 188850
* Use cstdio instead of stdio.hDmitri Gribenko2013-08-192-2/+2
| | | | llvm-svn: 188678
* libclang: cleanup unused includes in public headerDmitri Gribenko2013-08-182-0/+2
| | | | llvm-svn: 188625
* Rename libIDE to libIndex.Argyrios Kyrtzidis2013-08-173-17/+17
| | | | | | | Per feedback from Chandler, it's better to have libraries with more specific functionality. LibIndex will contain the indexing functionality of libclang, which includes USR generation. llvm-svn: 188601
* Replace some DenseMap keys with simpler structures that don't need another ↵Benjamin Kramer2013-08-161-34/+1
| | | | | | DenseMapInfo specialization. llvm-svn: 188580
* Introduce the clangIDE library.Argyrios Kyrtzidis2013-08-163-814/+35
| | | | | | | | | | Libclang has a lot of functionality that is inaccessible. The purpose of clangIDE is to move most of the functionality of libclang to it so we can expose it and have libclang be more of a thin C wrapper over clangIDE. Start by moving the USR generation functionality into clangIDE. llvm-svn: 188569
OpenPOWER on IntegriCloud