summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* [libclang] Introduce APIs that assist in constructing a simple module.map ↵Argyrios Kyrtzidis2014-03-032-0/+63
| | | | | | | | file for a user framework. rdar://16092858 llvm-svn: 202681
* [libclang] Change clang_VirtualFileOverlay_writeToBuffer to return a ↵Argyrios Kyrtzidis2014-03-031-4/+8
| | | | | | | | malloc'ed buffer. Returning CXString is not appropriate if we want to switch to a non-string format buffer. llvm-svn: 202675
* [C++11] Use std::atomic instead of LLVM's.Benjamin Kramer2014-03-021-10/+8
| | | | | | No intended functionality change. llvm-svn: 202652
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-022-4/+4
| | | | llvm-svn: 202639
* [C++11] Replace verbose functors with succinct lambdasBenjamin Kramer2014-03-011-14/+6
| | | | | | No functionality change. llvm-svn: 202590
* Now that llvm's build system sets -install_name, we don't need to.Rafael Espindola2014-02-282-10/+0
| | | | llvm-svn: 202500
* Add 'remark' diagnostic type in 'clang'Tobias Grosser2014-02-282-0/+2
| | | | | | | | | | | | | | | | | | | | | | | A 'remark' is information that is not an error or a warning, but rather some additional information provided to the user. In contrast to a 'note' a 'remark' is an independent diagnostic, whereas a 'note' always depends on another diagnostic. A typical use case for remark nodes is information provided to the user, e.g. information provided by the vectorizer about loops that have been vectorized. This patch provides the initial implementation of 'remarks'. It includes the actual definiton of the remark nodes, their printing as well as basic parameter handling. We are reusing the existing diagnostic parameters which means a remark can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade remarks. This patch is by intention minimal in terms of parameter handling. More experience and more discussions will most likely lead to further enhancements in the parameter handling. llvm-svn: 202475
* libclang: New functions clang_Type_getNumTemplateArguments,Dmitri Gribenko2014-02-272-0/+36
| | | | | | | | | | clang_Type_getTemplateArgument Note that these functions don't handle variadic templates -- see tests. Patch by Matthieu Nottale and Philippe Daouadi. llvm-svn: 202406
* [OPENMP] First changes for Parsing and Sema for 'omp simd' directive supportAlexey Bataev2014-02-272-3/+12
| | | | llvm-svn: 202360
* [libclang] Introduce libclang APIs for creating a buffer with a JSON virtual ↵Argyrios Kyrtzidis2014-02-252-2/+179
| | | | | | | | | | file overlay description. The current API only supports adding 'virtual file path' -> 'real file path' mappings. rdar://15986708 llvm-svn: 202105
* [CMake] libclang: Use llvm_add_library(SHARED STATIC).NAKAMURA Takumi2014-02-211-37/+33
| | | | llvm-svn: 201862
* [CMake] Get rid of explicit dependencies to include/clang/*.inc and ↵NAKAMURA Takumi2014-02-211-16/+4
| | | | | | | | | | | | | | | | | | | introduce CLANG_TABLEGEN_TARGETS. This does; - clang_tablegen() adds each tblgen'd target to global property CLANG_TABLEGEN_TARGETS as list. - List of targets is added to LLVM_COMMON_DEPENDS. - all clang libraries and targets depend on generated headers. You might wonder this would be regression, but in fact, this is little loss. - Almost all of clang libraries depend on tblgen'd files and clang-tblgen. - clang-tblgen may cause short stall-out but doesn't cause unconditional rebuild. - Each library's dependencies to tblgen'd files might vary along headers' structure. It made hard to track and update *really optimal* dependencies. Each dependency to intrinsics_gen and ClangSACheckers is left as DEPENDS. llvm-svn: 201842
* libclang: ensure clang_createTranslationUnit2 always initializes *TUDmitri Gribenko2014-02-191-1/+4
| | | | llvm-svn: 201657
* CIndex: initialise TUSaleem Abdulrasool2014-02-191-1/+1
| | | | | | | | | | | TU is not guaranteed to be initialised in all cases. In particular if CIdx or ast_filename is NULL (or if &TU is NULL), then clang_createTranslationUnit2 will not initialise the out parameter out_TU. This is followed by an assertion check which may perform a branch based on unitialised memory. Caught by scan-build. llvm-svn: 201628
* libclang: fix a bug in processing invalid arguments, introduced in r201249Dmitri Gribenko2014-02-181-10/+7
| | | | | | Recommit r201346, reverted in r201373. llvm-svn: 201578
* Revert "libclang: fix a bug in processing invalid arguments, introduced in ↵Juergen Ributzka2014-02-131-7/+10
| | | | | | | | r201249," Reverting commit (201346) for now, because it is breaking our internal builds. llvm-svn: 201373
* libclang: fix a bug in processing invalid arguments, introduced in r201249,Dmitri Gribenko2014-02-131-10/+7
| | | | | | pointed out by Daniel Jasper in r201329 llvm-svn: 201346
* Remove assert added in r201249.Daniel Jasper2014-02-131-2/+6
| | | | | | | | | | | This triggers on one of our internal tests. Dmitri: I do not understand this part of the codebase well enough to locate the underlying cause easily. If the correct fix is not obvious, I can try to debug the problem further or try to come up with reduced test case. llvm-svn: 201329
* [OPENMP] 'if' clause support (no CodeGen support)Alexey Bataev2014-02-131-0/+4
| | | | llvm-svn: 201297
* Really fix unused variable warnings in CIndex.Reid Kleckner2014-02-131-0/+1
| | | | llvm-svn: 201285
* Silence unused variable warning in CIndex.cpp with NDEBUGReid Kleckner2014-02-121-0/+1
| | | | llvm-svn: 201276
* libclang: report error code for bad PCH filesDmitri Gribenko2014-02-124-44/+141
| | | | | | | | | | | | | | | | | | | This commit improves libclang to report the error condition when CXTranslationUnit can not be created because of a stale PCH file. This allows the caller, for example, to rebuild the PCH file and retry the request. There two are APIs in libclang that return a CXTranslationUnit and don't support reporting detailed errors (the only error condition is a NULL result). For these APIs, a second, superior, version is introduced -- clang_createTranslationUnit2 and clang_parseTranslationUnit2. These functions return a CXTranslationUnit indirectly and also return an error code. Old functions are still supported and are nothing more than convenience wrappers that ignore extended error codes. As a cleanup, this commit also categorizes some libclang errors in the functions I had to modify anyway. llvm-svn: 201249
* libclang: fix a crash in clang_disposeDiagnosticSet when it is passed a NULL ↵Dmitri Gribenko2014-02-121-3/+4
| | | | | | argument llvm-svn: 201236
* 'svn add' files I forgot for r201224 (Add an option to allow Clang verifyDmitri Gribenko2014-02-121-0/+22
| | | | | | source files for a module only once during) llvm-svn: 201225
* Add an option to allow Clang verify source files for a module only once duringDmitri Gribenko2014-02-122-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the build When Clang loads the module, it verifies the user source files that the module was built from. If any file was changed, the module is rebuilt. There are two problems with this: 1. correctness: we don't verify system files (there are too many of them, and stat'ing all of them would take a lot of time); 2. performance: the same module file is verified again and again during a single build. This change allows the build system to optimize source file verification. The idea is based on the fact that while the project is being built, the source files don't change. This allows us to verify the module only once during a single build session. The build system passes a flag, -fbuild-session-timestamp=, to inform Clang of the time when the build started. The build system also requests to enable this feature by passing -fmodules-validate-once-per-build-session. If these flags are not passed, the behavior is not changed. When Clang verifies the module the first time, it writes out a timestamp file. Then, when Clang loads the module the second time, it finds a timestamp file, so it can compare the verification timestamp of the module with the time when the build started. If the verification timestamp is too old, the module is verified again, and the timestamp file is updated. llvm-svn: 201224
* Fix a typo in the function name that I just introduced (r201155)Dmitri Gribenko2014-02-118-26/+26
| | | | llvm-svn: 201156
* libclang: audit all APIs that accept a CXTranslationUnit to make sure thatDmitri Gribenko2014-02-118-26/+123
| | | | | | | checks for invalid translation unit are in place. Also, while there, add log output for this case. llvm-svn: 201155
* libclang: use namespace qualifiers in the macro, so that it does not requireDmitri Gribenko2014-02-111-1/+2
| | | | | | 'using namespace clang::cxindex'. llvm-svn: 201146
* [libclang] While visiting a C++ destructor decl, keep the type identifier ↵Argyrios Kyrtzidis2014-02-091-2/+3
| | | | | | | | | | associated with the decl, don't turn it into a type ref. rdar://15907618 llvm-svn: 201042
* ASTUnit: ArrayRef'ize RemappedFilesDmitri Gribenko2014-02-072-10/+7
| | | | llvm-svn: 200975
* libclang/Makefile: Reorder libraries.NAKAMURA Takumi2014-01-311-3/+6
| | | | llvm-svn: 200508
* Rename getResultLoc() tooAlp Toker2014-01-251-3/+3
| | | | | | | | Follow up to r200082. Spotted by Dmitri llvm-svn: 200105
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-253-5/+5
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* [CMake] libclang: Update GENERATED_HEADERS with actually used.NAKAMURA Takumi2014-01-241-0/+2
| | | | | | | + ClangAttrVisitor + ClangCommentCommandList llvm-svn: 199999
* [CMake] Move LIBCLANG_BUILD_STATIC above. NFC.NAKAMURA Takumi2014-01-231-3/+3
| | | | llvm-svn: 199903
* [CMake] Parameterize MODULE and SHARED in add_clang_library().NAKAMURA Takumi2014-01-231-2/+1
| | | | llvm-svn: 199902
* [CMake][MS] libclang: Invalidate LLVM_EXPORTED_SYMBOL_FILE to suppress LNK4197.NAKAMURA Takumi2014-01-221-0/+7
| | | | | | | Each functions is exported as "dllexport" in include/clang-c. See also KB835326. llvm-svn: 199799
* Introduce and use Decl::getAsFunction() to simplify templated function checksAlp Toker2014-01-221-18/+6
| | | | | | | | | | | | | | Lift the getFunctionDecl() utility out of the parser into a general Decl::getAsFunction() and use it to simplify other parts of the implementation. Reduce isFunctionOrFunctionTemplate() to a simple type check that works the same was as the other is* functions and move unwrapping of shadowed decls to callers so it doesn't get run twice. Shuffle around canSkipFunctionBody() to reduce virtual dispatch on ASTConsumer. There's no need to query when we already know the body can't be skipped. llvm-svn: 199794
* Correct various uses of 'argument' that in fact refer to function parametersAlp Toker2014-01-211-2/+2
| | | | | | Cleanup only. llvm-svn: 199773
* Update FunctionTypeLoc and related names to match r199686Alp Toker2014-01-211-4/+4
| | | | llvm-svn: 199699
* Rename FunctionProtoType accessors from 'arguments' to 'parameters'Alp Toker2014-01-201-4/+4
| | | | | | | | | | | | | | | | | Fix a perennial source of confusion in the clang type system: Declarations and function prototypes have parameters to which arguments are supplied, so calling these 'arguments' was a stretch even in C mode, let alone C++ where default arguments, templates and overloading make the distinction important to get right. Readability win across the board, especially in the casting, ADL and overloading implementations which make a lot more sense at a glance now. Will keep an eye on the builders and update dependent projects shortly. No functional change. llvm-svn: 199686
* [CMake] Apply ADDITIONAL_HEADERS introduced in r199639.NAKAMURA Takumi2014-01-201-9/+11
| | | | llvm-svn: 199640
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-073-5/+5
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* Eliminate UnaryTypeTraitExprAlp Toker2014-01-012-6/+0
| | | | | | | | | | | | | Remove UnaryTypeTraitExpr and switch all remaining type trait related handling over to TypeTraitExpr. The UTT/BTT/TT enum prefix and evaluation code is retained pending further cleanup. This is part of the ongoing work to unify type traits following the removal of BinaryTypeTraitExpr in r197273. llvm-svn: 198271
* Port r198088 (set NO_DEAD_STRIP for clang) from make to cmake.Nico Weber2013-12-301-2/+1
| | | | | | | | Also stop setting passing -dead_strip explicitly for libclang and instead rely on this now happening by default. (And make it happen by default for add_clang_library, which doesn't use the library cmake functions from llvm.) llvm-svn: 198200
* Use LLVM_EXPORTED_SYMBOL_FILE in libclang's cmake build.Nico Weber2013-12-291-1/+1
| | | | | | Now the exports file should have an effect on non-darwin too. llvm-svn: 198176
* Set NO_DEAD_STRIP for clang after llvm r198087.Nico Weber2013-12-271-3/+0
| | | | llvm-svn: 198088
* Move tools/libclang/RecursiveASTVisitor.h -> ↵Argyrios Kyrtzidis2013-12-203-2392/+5
| | | | | | | | include/clang/AST/DataRecursiveASTVisitor.h This is to make it available so the static analyzer can use it. llvm-svn: 197766
* Eliminate BinaryTypeTraitExprAlp Toker2013-12-133-12/+0
| | | | | | | | | | | | | | | | | There's nothing special about type traits accepting two arguments. This commit eliminates BinaryTypeTraitExpr and switches all related handling over to TypeTraitExpr. Also fixes a CodeGen failure with variadic type traits appearing in a non-constant expression. The BTT/TT prefix and evaluation code is retained as-is for now but will soon be further cleaned up. This is part of the ongoing work to unify type traits. llvm-svn: 197273
* Fix autoconf build in libclang since r197075, (has been reverted in r197111).NAKAMURA Takumi2013-12-121-0/+1
| | | | llvm-svn: 197114
OpenPOWER on IntegriCloud