summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
* [libclang] Remove duplicate dependency on LLVMSupportJan Korous2020-05-071-1/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D79451 (cherry picked from commit 02b303321d3f0d3b2c69f68aa25560848dd61f98)
* [Concepts] Requires ExpressionsSaar Raz2020-01-242-0/+2
| | | | | | | | | | Implement support for C++2a requires-expressions. Re-commit after compilation failure on some platforms due to alignment issues with PointerIntPair. Differential Revision: https://reviews.llvm.org/D50360 (cherry picked from commit a0f50d731639350c7a79f140f026c27a18215531)
* [Concepts] Type ConstraintsSaar Raz2020-01-151-1/+11
| | | | | | | Add support for type-constraints in template type parameters. Also add support for template type parameters as pack expansions (where the type constraint can now contain an unexpanded parameter pack). Differential Revision: https://reviews.llvm.org/D44352
* Removed PointerUnion3 and PointerUnion4 aliases in favor of the variadic ↵Dmitri Gribenko2020-01-141-3/+3
| | | | template
* [OPENMP50]Codegen for nontemporal clause.Alexey Bataev2019-12-231-0/+2
| | | | | | | | | | | | | | | | Summary: Basic codegen for the declarations marked as nontemporal. Also, if the base declaration in the member expression is marked as nontemporal, lvalue for member decl access inherits nonteporal flag from the base lvalue. Reviewers: rjmccall, hfinkel, jdoerfert Subscribers: guansong, arphaman, caomhin, kkwli0, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71708
* [Wdocumentation] Implement \anchorMark de Wever2019-12-211-0/+3
| | | | Differential revision: https://reviews.llvm.org/D69223
* [OPENMP50]Add parsing/sema analysis for nontemporal clause.Alexey Bataev2019-12-171-0/+4
| | | | | Add basic support for parsing/sema analysis of the nontemporal clause in simd-based directives.
* [NFC] Fix typos in Clangd and ClangKirill Bobyrev2019-12-162-11/+11
| | | | | | Reviewed by: Jim Differential Revision: https://reviews.llvm.org/D71455
* [OpenMP50] Add parallel master constructcchen2019-12-052-0/+11
| | | | | | | | | | | | Reviewers: ABataev, jdoerfert Reviewed By: ABataev Subscribers: rnk, jholewinski, guansong, arphaman, jfb, cfe-commits, sandoval, dreachem Tags: #clang Differential Revision: https://reviews.llvm.org/D70726
* Revert "[OpenMP50] Add parallel master construct, by Chi Chun Chen."Reid Kleckner2019-12-042-11/+0
| | | | | | This reverts commit 713dab21e27c987b9114547ce7136bac2e775de9. Tests do not pass on Windows.
* [OpenMP50] Add parallel master construct, by Chi Chun Chen.cchen2019-12-042-0/+11
| | | | | | | | | | | | Reviewers: ABataev, jdoerfert Reviewed By: ABataev Subscribers: jholewinski, guansong, arphaman, jfb, cfe-commits, sandoval, dreachem Tags: #clang Differential Revision: https://reviews.llvm.org/D70726
* [CIndex] Fix annotate-deep-statements test when using a Debug buildAlexandre Ganea2019-11-291-3/+6
| | | | Differential Revision: https://reviews.llvm.org/D70149
* [NFC] Refactor representation of materialized temporariesTyker2019-11-191-0/+1
| | | | | | | | | | | | | | | Summary: this patch refactor representation of materialized temporaries to prevent an issue raised by rsmith in https://reviews.llvm.org/D63640#inline-612718 Reviewers: rsmith, martong, shafik Reviewed By: rsmith Subscribers: thakis, sammccall, ilya-biryukov, rnkovacs, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69360
* Revert "[NFC] Refactor representation of materialized temporaries"Nico Weber2019-11-171-1/+0
| | | | | | This reverts commit 08ea1ee2db5f9d6460fef1d79d0d1d1a5eb78982. It broke ./ClangdTests/FindExplicitReferencesTest.All on the bots, see comments on https://reviews.llvm.org/D69360
* [NFC] Refactor representation of materialized temporariesTyker2019-11-161-0/+1
| | | | | | | | | | | | | | | Summary: this patch refactor representation of materialized temporaries to prevent an issue raised by rsmith in https://reviews.llvm.org/D63640#inline-612718 Reviewers: rsmith, martong, shafik Reviewed By: rsmith Subscribers: rnkovacs, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69360
* Redeclare Objective-C property accessors inside the ObjCImplDecl in which ↵Adrian Prantl2019-11-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | they are synthesized. This patch is motivated by (and factored out from) https://reviews.llvm.org/D66121 which is a debug info bugfix. Starting with DWARF 5 all Objective-C methods are nested inside their containing type, and that patch implements this for synthesized Objective-C properties. 1. SemaObjCProperty populates a list of synthesized accessors that may need to inserted into an ObjCImplDecl. 2. SemaDeclObjC::ActOnEnd inserts forward-declarations for all accessors for which no override was provided into their ObjCImplDecl. This patch does *not* synthesize AST function *bodies*. Moving that code from the static analyzer into Sema may be a good idea though. 3. Places that expect all methods to have bodies have been updated. I did not update the static analyzer's inliner for synthesized properties to point back to the property declaration (see test/Analysis/Inputs/expected-plists/nullability-notes.m.plist), which I believed to be more bug than a feature. Differential Revision: https://reviews.llvm.org/D68108 rdar://problem/53782400
* [OPENMP50]Add support for parallel master taskloop simd directive.Alexey Bataev2019-10-302-0/+12
| | | | Added full support for parallel master taskloop simd directive.
* Reland "[Support] Add a way to run a function on a detached thread""Sam McCall2019-10-231-1/+3
| | | | | This reverts commit 7bc7fe6b789d25d48d6dc71d533a411e9e981237. The immediate callers have been fixed to pass nullopt where appropriate.
* [c++20] Add CXXRewrittenBinaryOperator to represent a comparisonRichard Smith2019-10-191-0/+1
| | | | | | | | operator that is rewritten as a call to multiple other operators. No functionality change yet: nothing creates these expressions. llvm-svn: 375305
* [OPENMP50]Add support for master taskloop simd.Alexey Bataev2019-10-182-0/+12
| | | | | | Added trsing/semantics/codegen for combined construct master taskloop simd. llvm-svn: 375255
* Replace platform-dependent `stat` with `llvm::sys::fs::status`. NFC intended.Volodymyr Sapsai2019-10-161-2/+2
| | | | | | | | | | | | Reviewers: bruno, sammccall Reviewed By: sammccall Subscribers: jkorous, dexonsmith, arphaman, ributzka, cfe-commits Differential Revision: https://reviews.llvm.org/D69011 llvm-svn: 375031
* [Concepts] Concept Specialization ExpressionsSaar Raz2019-10-151-0/+1
| | | | | | | | | | Part of C++20 Concepts implementation effort. Added Concept Specialization Expressions that are created when a concept is refe$ D41217 on Phabricator. (recommit after fixing failing Parser test on windows) llvm-svn: 374903
* Revert 374882 "[Concepts] Concept Specialization Expressions"Nico Weber2019-10-151-1/+0
| | | | | | | | | | This reverts commit ec87b003823d63f3342cf648f55a134c1522e612. The test fails on Windows, see e.g. http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/11533/steps/stage%201%20check/logs/stdio Also revert follow-up r374893. llvm-svn: 374899
* [Concepts] Concept Specialization ExpressionsSaar Raz2019-10-151-0/+1
| | | | | | Part of C++20 Concepts implementation effort. Added Concept Specialization Expressions that are created when a concept is referenced with arguments, and tests thereof. llvm-svn: 374882
* [OPENMP50]Add support for 'parallel master taskloop' construct.Alexey Bataev2019-10-142-0/+12
| | | | | | | | | Added parsing/sema/codegen support for 'parallel master taskloop' constructs. Some of the clauses, like 'grainsize', 'num_tasks', 'final' and 'priority' are not supported in full, only constant expressions can be used currently in these clauses. llvm-svn: 374791
* [OPENMP50]Support for 'master taskloop' directive.Alexey Bataev2019-10-102-0/+11
| | | | | | Added full support for master taskloop directive. llvm-svn: 374437
* Correct function declarations; NFC.Aaron Ballman2019-09-301-2/+4
| | | | | | This header is included by C code so the functions need to have a prototype. Also, fix the function definitions so that they have C linkage rather than C++ linkage. llvm-svn: 373213
* [libclang] Expose abort()-ing LLVM fatal error handlerJan Korous2019-09-124-9/+34
| | | | | | Differential Revision: https://reviews.llvm.org/D66775 llvm-svn: 371787
* libclang depends on ClangDriverOptions since r352803Nico Weber2019-09-061-1/+4
| | | | | | | | | | | | | | | | | | | | | Without this, the build would sometimes fail with In file included from clang/tools/libclang/CIndexer.cpp:17: In file included from clang/include/clang/Driver/Driver.h:15: clang/include/clang/Driver/Options.h:44:10: fatal error: 'clang/Driver/Options.inc' file not found #include "clang/Driver/Options.inc" ^~~~~~~~~~~~~~~~~ if Options.inc wasn't generated before libclang was built by coincidence. (In the GN build, this works because lib/Driver there declares the dep on tablegen as a public_dep since the generated file is part of Driver's public interface, and then things work out automatically without every client of Driver having to be careful.) llvm-svn: 371205
* [clang][Index] Replace CodegenNameGenerator with ASTNameGeneratorJan Korous2019-09-051-7/+7
| | | | | | | | Follow-up to: 3ff8c3b73f6, d5d15b4c1fd Should be NFC since the original patch just moved the code. llvm-svn: 371117
* [libclang] Refactored SharedParsedRegionsStorageDmitri Gribenko2019-09-051-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Removed the `PPRegionSetTy` typedef because it is only used 3 times, and obscures code more than it helps. Renamed SharedParsedRegionsStorage to ThreadSafeParsedRegions, because that better reflects the reason for this type to exist. Replaced the `copyTo()` method that had an out parameter with a getter. Renamed the `merge()` method to `addParsedRegions()`. Renamed `ParsedSrcLocationsTracker::ParsedRegions` to `ParsedRegionsSnapshot`, which better reflects its role. Subscribers: arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67077 llvm-svn: 371041
* [Index] Added a ShouldSkipFunctionBody callback to libIndex, and refactored ↵Dmitri Gribenko2019-08-291-37/+35
| | | | | | | | | | | | clients to use it instead of inventing their own solution Subscribers: jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66879 llvm-svn: 370338
* [Index] Stopped wrapping FrontendActions in libIndex and its usersDmitri Gribenko2019-08-291-10/+13
| | | | | | | | | Exposed a new function, createIndexingASTConsumer, that creates an ASTConsumer. ASTConsumers compose well. Removed wrapping functionality from createIndexingAction. llvm-svn: 370337
* [preprocessor] Add an opportunity to retain excluded conditional blocksEvgeny Mankov2019-08-271-1/+3
| | | | | | | | | | | | | | It is handy for clang tooling, for instance, in source to source transformation. Reviewers: vpykhtin (Valery Pykhtin), erichkeane (Erich Keane) Subscribers: rsmith (Richard Smith), akyrtzi (Argyrios Kyrtzidis) Tags: #clang Differential Revision: https://reviews.llvm.org/D66597 llvm-svn: 370123
* [libclang][index][NFCi] Refactor machinery for skipping function bodiesJan Korous2019-08-261-41/+65
| | | | | | | | | | | Refactor machinery for skipping inline function bodies that have already been parsed in other frontend actions. Preparations for moving this code to libIndex. Differential Revision: https://reviews.llvm.org/D66694 llvm-svn: 369931
* [libclang][NFC] Remove debug commentJan Korous2019-08-221-3/+1
| | | | llvm-svn: 369714
* [Clang] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-145-11/+11
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
* Removed dead code from clang/tools/libclang/CXIndexDataConsumer.{cpp,h}Dmitri Gribenko2019-08-142-51/+0
| | | | | | | | | | | | Reviewers: jkorous Subscribers: dexonsmith, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66156 llvm-svn: 368805
* Add SVE opaque built-in typesRichard Sandiford2019-08-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the SVE built-in types defined by the Procedure Call Standard for the Arm Architecture: https://developer.arm.com/docs/100986/0000 It handles the types in all relevant places that deal with built-in types. At the moment, some of these places bail out with an error, including: (1) trying to generate LLVM IR for the types (2) trying to generate debug info for the types (3) trying to mangle the types using the Microsoft C++ ABI (4) trying to @encode the types in Objective C (1) and (2) are fixed by follow-on patches but (unlike this patch) they deal mostly with target-specific LLVM details, so seemed like a logically separate change. There is currently no spec for (3) and (4), so reporting an error seems like the correct behaviour for now. The intention is that the types will become sizeless types: http://lists.llvm.org/pipermail/cfe-dev/2019-June/062523.html The main purpose of the sizeless type extension is to diagnose impossible or dangerous uses of the types, such as any that would require sizeof to have a meaningful defined value. Until then, the patch sets the alignments of the types to the values specified in the link above. It also sets the sizes of the types to zero, which is chosen to be consistently wrong and shouldn't affect correctly-written code (i.e. code that would compile even with the sizeless type extension). The patch adds the common subset of functionality needed to test the sizeless type extension on the one hand and to provide SVE intrinsic functions on the other. After this patch, the two pieces of work are essentially independent. The patch is based on one by Graham Hunter: https://reviews.llvm.org/D59245 Differential Revision: https://reviews.llvm.org/D62960 llvm-svn: 368413
* Remove LLVM mutexes from clang in favor of std::mutexBenjamin Kramer2019-08-072-4/+3
| | | | | | | None of those need to be recursive mutexes. No functionality change intended. llvm-svn: 368173
* Replace non-recursive sys::Mutex users with std::mutexBenjamin Kramer2019-08-071-5/+3
| | | | | | | Also remove a use of sys::MutexImpl, that's just evil. No functionality change intended. llvm-svn: 368157
* Replace llvm::MutexGuard/UniqueLock with their standard equivalentsBenjamin Kramer2019-08-072-4/+4
| | | | | | | All supported platforms have <mutex> now, so we don't need our own copies any longer. No functionality change intended. llvm-svn: 368149
* [clang] Adopt new FileManager error-returning APIsHarlan Haskins2019-08-012-5/+10
| | | | | | | Update the callers of FileManager::getFile and FileManager::getDirectory to handle the new llvm::ErrorOr-returning methods. Signed-off-by: Harlan Haskins <harlan@apple.com> llvm-svn: 367616
* cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macrosTom Stellard2019-07-121-1/+1
| | | | | | | | | | | | | | | | | | | Summary: This will simplify the macros by allowing us to remove the hard-coded list of libraries that should be installed when LLVM_INSTALL_TOOLCHAIN_ONLY is enabled. Reviewers: beanz, smeenai Reviewed By: beanz Subscribers: aheejin, mehdi_amini, mgorny, steven_wu, dexonsmith, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D64580 llvm-svn: 365902
* [Concepts] Concept definitions (D40381)Saar Raz2019-07-101-0/+1
| | | | | | | First in a series of patches to land C++2a Concepts support. This patch adds AST and parsing support for concept-declarations. llvm-svn: 365699
* [libclang] Fix hang in release / assertion in debug when evaluating ↵Emilio Cobos Alvarez2019-07-091-0/+2
| | | | | | | | | | | | | value-dependent types. Expression evaluator doesn't work in value-dependent types, so ensure that the precondition it asserts holds. This fixes https://bugs.llvm.org/show_bug.cgi?id=42532 Differential Revision: https://reviews.llvm.org/D64409 llvm-svn: 365490
* [Bitcode] Move Bitstream to a separate libraryFrancis Visoiu Mistrih2019-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This moves Bitcode/Bitstream*, Bitcode/BitCodes.h to Bitstream/. This is needed to avoid a circular dependency when using the bitstream code for parsing optimization remarks. Since Bitcode uses Core for the IR part: libLLVMRemarks -> Bitcode -> Core and Core uses libLLVMRemarks to generate remarks (see IR/RemarkStreamer.cpp): Core -> libLLVMRemarks we need to separate the Bitstream and Bitcode part. For clang-doc, it seems that it doesn't need the whole bitcode layer, so I updated the CMake to only use the bitstream part. Differential Revision: https://reviews.llvm.org/D63899 llvm-svn: 365091
* [C++2a] Add __builtin_bit_cast, used to implement std::bit_castErik Pilkington2019-07-022-0/+4
| | | | | | | | | | | | | | | | | | This commit adds a new builtin, __builtin_bit_cast(T, v), which performs a bit_cast from a value v to a type T. This expression can be evaluated at compile time under specific circumstances. The compile time evaluation currently doesn't support bit-fields, but I'm planning on fixing this in a follow up (some of the logic for figuring this out is in CodeGen). I'm also planning follow-ups for supporting some more esoteric types that the constexpr evaluator supports, as well as extending __builtin_memcpy constexpr evaluation to use the same infrastructure. rdar://44987528 Differential revision: https://reviews.llvm.org/D62825 llvm-svn: 364954
* [libclang] Allow skipping warnings from all included filesNikolai Kosjar2019-06-112-4/+12
| | | | | | | | | | | | Depending on the included files and the used warning flags, e.g. - Weverything, a huge number of warnings can be reported for included files. As processing that many diagnostics comes with a performance impact and not all clients are interested in those diagnostics, add a flag to skip them. Differential Revision: https://reviews.llvm.org/D48116 llvm-svn: 363067
* Build with _XOPEN_SOURCE defined on AIXDavid Tenty2019-06-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: It is useful to build with _XOPEN_SOURCE defined on AIX, enabling X/Open and POSIX compatibility mode, to work around stray macros and other bugs in the headers provided by the system and build compiler. This patch adds the config to cmake to build with _XOPEN_SOURCE defined on AIX with a few exceptions. Google Test internals require access to platform specific thread info constructs on AIX so in that case we build with _ALL_SOURCE defined instead. Libclang also uses header which needs _ALL_SOURCE on AIX so we leave that as is as well. We also add building on AIX with the large file API and doing CMake header checks with X/OPEN definitions so the results are consistent with the environment that will be present in the build. Reviewers: hubert.reinterpretcast, xingxue, andusy Reviewed By: hubert.reinterpretcast Subscribers: mgorny, jsji, cfe-commits, llvm-commits Tags: #llvm, #clang Differential Revision: https://reviews.llvm.org/D62533 llvm-svn: 362808
OpenPOWER on IntegriCloud