summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix variable ‘IsInitCapturePack’ set but not used warning. NFCI.Simon Pilgrim2019-08-291-4/+1
| | | | llvm-svn: 370345
* Removed `AnyFunctionDecl`, it is unused.Dmitri Gribenko2019-08-292-50/+0
| | | | llvm-svn: 370341
* Removed two function declarations that don't have definitionsDmitri Gribenko2019-08-291-6/+0
| | | | llvm-svn: 370340
* [Index] Added a ShouldSkipFunctionBody callback to libIndex, and refactored ↵Dmitri Gribenko2019-08-293-50/+66
| | | | | | | | | | | | 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-294-64/+37
| | | | | | | | | Exposed a new function, createIndexingASTConsumer, that creates an ASTConsumer. ASTConsumers compose well. Removed wrapping functionality from createIndexingAction. llvm-svn: 370337
* [Index] Moved the IndexDataConsumer::finish call into the IndexASTConsumer ↵Dmitri Gribenko2019-08-291-32/+24
| | | | | | | | | from IndexAction Doing so removes the last reason to expose a FrontendAction from libIndex. llvm-svn: 370336
* [CodeGen]: don't treat structures returned in registers as memory inputsAlexander Potapenko2019-08-293-6/+139
| | | | | | | | | | | | | | | | | | | | Summary: The "=r" output constraint for a structure variable passed to inline asm shouldn't be converted to "=*r", as this changes the asm directive semantics and prevents DSE optimizations. Instead, preserve the constraints and return such structures as integers of corresponding size, which are converted back to structures when storing the result. Fixes PR42672. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65234 llvm-svn: 370335
* [Index] Create PP callbacks in the ASTConsumerDmitri Gribenko2019-08-291-45/+31
| | | | | | | | Doing so removes one reason to create a custom FrontendAction. FrontendActions are not desirable because they are difficult to compose. ASTConsumers are much easier to compose. llvm-svn: 370323
* [OpenCL] Fix diagnosing enqueue_kernel call with too few argsSven van Haastregt2019-08-292-1/+5
| | | | | | | | | | | | The err_typecheck_call_too_few_args diagnostic takes arguments, but none were provided causing clang to crash when attempting to diagnose an enqueue_kernel call with too few arguments. Fixes llvm.org/PR42045 Differential Revision: https://reviews.llvm.org/D66883 llvm-svn: 370322
* [Index] Marked a bunch of classes 'final'Dmitri Gribenko2019-08-291-4/+4
| | | | | | | This file defines multiple inheritance hierarchies and 'final' helps with readability. llvm-svn: 370321
* [Analyzer] Iterator Checkers - Make range errors and invalidated access fatalAdam Balogh2019-08-295-71/+441
| | | | | | | | | | | | | | Range errors (dereferencing or incrementing the past-the-end iterator or decrementing the iterator of the first element of the range) and access of invalidated iterators lead to undefined behavior. There is no point to continue the analysis after such an error on the same execution path, but terminate it by a sink node (fatal error). This also improves the performance and helps avoiding double reports (e.g. in case of nested iterators). Differential Revision: https://reviews.llvm.org/D62893 llvm-svn: 370314
* [Test][Time profiler] Fix test for python3Anton Afanasyev2019-08-291-3/+3
| | | | | | | | | | | | | | | | Summary: Fix test checking time profiler generates correct tracing json-file. `filter` works differently for python2 and python3, so unifying this. Reviewers: mgehre, nathanchance Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66873 llvm-svn: 370300
* Removed dead code from clang/AST/NSAPI.hDmitri Gribenko2019-08-292-14/+0
| | | | | | | | | | Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66884 llvm-svn: 370298
* [x86] Adding support for some missing intrinsics: _mm512_cvtsi512_si32Pengfei Wang2019-08-292-0/+23
| | | | | | | | | | | | | | | | | | Summary: Adding support for some missing intrinsics: _mm512_cvtsi512_si32 Reviewers: craig.topper, pengfei, LuoYuanke, spatel, RKSimon Reviewed By: craig.topper Subscribers: llvm-commits Patch by Bing Yu (yubing) Differential Revision: https://reviews.llvm.org/D66785 llvm-svn: 370297
* [Modules] Fix rebuilding an updated module for each of its consumers.Volodymyr Sapsai2019-08-286-6/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Marking a module for a rebuild when its signature differs from the expected one causes redundant module rebuilds for incremental builds. When a module is updated, its signature changes. But its consumers still have the old signature and loading them will result in signature mismatches. It will correctly cause the rebuilds for the consumers but we don't need to rebuild the common module for each of them as it is already up to date. In practice this bug causes longer build times. We are doing more work than required and only a single process can build a module, so parallel builds degrade to a single-process mode where extra processes are just waiting on a file lock. Fix by not marking a module dependency for a rebuild on signature mismatch. We'll check if it is up to date when we load it. rdar://problem/50212358 Reviewers: dexonsmith, bruno, rsmith Reviewed By: dexonsmith, bruno Subscribers: jkorous, ributzka, cfe-commits, aprantl Differential Revision: https://reviews.llvm.org/D66907 llvm-svn: 370274
* Fix a passing XFAIL testErik Pilkington2019-08-281-3/+3
| | | | | | | Now that we can gracefully handle stack exhaustion, this test was passing in darwin && asan. Instead, just unsupport it when threading is unavailable. llvm-svn: 370270
* [analyzer] Fix more analyzer warnings on analyzer and libAnalysis.Artem Dergachev2019-08-284-18/+14
| | | | llvm-svn: 370263
* Fix always_inline 'target' compatibility check code for LambdasErich Keane2019-08-282-2/+46
| | | | | | | | | The previous version of this used CurFuncDecl in CodeGenFunction, however this doesn't include lambdas. However, CurCodeDecl DOES. Switch the check to use CurCodeDecl so that the actual function being emitted gets checked, preventing an error in ISEL. llvm-svn: 370261
* [CFG] Make representation of destructor calls more accurate.Artem Dergachev2019-08-289-90/+423
| | | | | | | | | | | | | | | | | Respect C++17 copy elision; previously it would generate destructor calls for elided temporaries, including in initialization and return statements. Don't generate duplicate destructor calls for statement expressions. Fix destructors in initialization lists and comma operators. Improve printing of implicit destructors. Patch by Nicholas Allegra! Differential Revision: https://reviews.llvm.org/D66404 llvm-svn: 370247
* [analyzer] Fix analyzer warnings on analyzer.Artem Dergachev2019-08-2821-65/+134
| | | | | | | | | Write tests for the actual crash that was found. Write comments and refactor code around 17 style bugs and suppress 3 false positives. Differential Revision: https://reviews.llvm.org/D66847 llvm-svn: 370246
* [analyzer] pr43036: Fix support for operator 'sizeof...'.Artem Dergachev2019-08-282-0/+16
| | | | | | | | | It was known to be a compile-time constant so it wasn't evaluated during symbolic execution, but it wasn't evaluated as a compile-time constant either. Differential Revision: https://reviews.llvm.org/D66565 llvm-svn: 370245
* [analyzer] Trust global initializers when analyzing main().Artem Dergachev2019-08-283-16/+112
| | | | | | | | | | | | | | | | | If the global variable has an initializer, we'll ignore it because we're usually not analyzing the program from the beginning, which means that the global variable may have changed before we start our analysis. However when we're analyzing main() as the top-level function, we can rely on global initializers to still be valid. At least in C; in C++ we have global constructors that can still break this logic. This patch allows the Static Analyzer to load constant initializers from global variables if the top-level function of the current analysis is main(). Differential Revision: https://reviews.llvm.org/D65361 llvm-svn: 370244
* Try fixing CRLF issues in Git with [clang-scan-deps] Minimizer: Correctly ↵Alexandre Ganea2019-08-282-3/+16
| | | | | | | | handle multi-line content with CR+LF line endings Differential Revision: https://reviews.llvm.org/D66556 llvm-svn: 370219
* [OPENMP][Analysis] Add analysis of the map clauses.Alexey Bataev2019-08-2814-50/+147
| | | | | | | | | | | | | | | | Summary: Added basic analysis of map clauses. Only map clauses with to and tofrom map type must be analyzed since all other map types (alloc, delete, etc.) do not require to use the value of the initial variable, instead they create the new copy of the variable. Reviewers: NoQ Subscribers: guansong, cfe-commits, kkwli0, caomhin Tags: #clang Differential Revision: https://reviews.llvm.org/D66668 llvm-svn: 370214
* Delete minimize_source_to_dependency_directives_invalid_error.cHans Wennborg2019-08-282-17/+0
| | | | | | | | It was added in r370129 with a .gitattributes file that means the file always shows up as having a local diff in Git checkouts (at least on Linux). Deleting it until we can figure out the right way to do this. llvm-svn: 370175
* Fixup build of clang-interpreter example after change in r370122.Douglas Yung2019-08-281-5/+1
| | | | | | This should fix the build failure on llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast. llvm-svn: 370151
* [Clang][Bundler] Do not require host triple for extracting device bundlesSergey Dmitriev2019-08-282-3/+26
| | | | | | | | Bundler currently requires host triple to be provided no matter if you are performing bundling or unbundling, but for unbundling operation such requirement is too restrictive. You may for example want to examine device part of the object for a particular offload target, but you have to extract host part as well even though you do not need it. Host triple isn't really needed for unbundling, so this patch removes that requirement. Differential Revision: https://reviews.llvm.org/D66601 llvm-svn: 370143
* Revert "Change the X86 datalayout to add three address spaces for 32 bit ↵Vlad Tsyrklevich2019-08-2816-44/+35
| | | | | | | | | signed," This reverts commit r370083 because it caused check-lld failures on sanitizer-x86_64-linux-fast. llvm-svn: 370142
* Fix "commas at the end of enumerator lists are a C99-specific"Vitaly Buka2019-08-281-1/+1
| | | | llvm-svn: 370141
* [ObjC] Fix type checking for qualified id block parameters.Volodymyr Sapsai2019-08-282-3/+14
| | | | | | | | | | | | | | | | | | When checking if block types are compatible, we are checking for compatibility their return types and parameters' types. As these types have different variance, we need to check them in different order. rdar://problem/52788423 Reviewers: erik.pilkington, arphaman Reviewed By: arphaman Subscribers: jkorous, dexonsmith, ributzka, cfe-commits Differential Revision: https://reviews.llvm.org/D66831 llvm-svn: 370130
* Re-land [clang-scan-deps] Minimizer: Correctly handle multi-line content ↵Alexandre Ganea2019-08-283-14/+55
| | | | | | | | | | with CR+LF line endings Previously, an #error directive with quoted, multi-line content, along with CR+LF line endings wasn't handled correctly. Differential Revision: https://reviews.llvm.org/D66556 llvm-svn: 370129
* [preprocessor] Add an opportunity to retain excluded conditional blocksEvgeny Mankov2019-08-278-6/+194
| | | | | | | | | | | | | | 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
* ArrayRef'ized CompilerInvocation::CreateFromArgsDmitri Gribenko2019-08-278-25/+12
| | | | | | | | | | Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66797 llvm-svn: 370122
* [clang][Index][NFC] Move IndexDataConsumer default implementationJan Korous2019-08-272-26/+11
| | | | llvm-svn: 370116
* [Clang][Bundler] Fix for a hang when unbundling fat binarySergey Dmitriev2019-08-272-4/+10
| | | | | | | | clang-offload-bundler tool may hang under certain conditions when it extracts a subset of all available device bundles from the fat binary that is handled by the BinaryFileHandler. This patch fixes this problem. Differential Revision: https://reviews.llvm.org/D66598 llvm-svn: 370115
* Diagnose _Bool as a C99 extension.Aaron Ballman2019-08-272-0/+6
| | | | llvm-svn: 370108
* Debug Info: Support for DW_AT_export_symbols for anonymous structsShafik Yaghmour2019-08-272-1/+17
| | | | | | | | | | | | | | | | | | | | This implements the DWARF 5 feature described in: http://dwarfstd.org/ShowIssue.php?issue=141212.1 To support recognizing anonymous structs: struct A { struct { // Anonymous struct int y; }; } a; This patch adds support in CGDebugInfo::CreateLimitedType(...) for this new flag and an accompanying test to verify this feature. Differential Revision: https://reviews.llvm.org/D66667 llvm-svn: 370107
* AMDGPU: Always emit amdgpu-flat-work-group-sizeMatt Arsenault2019-08-272-16/+29
| | | | | | | The backend default maximum should be the hardware maximum, so the frontend should set the implementation defined default maximum. llvm-svn: 370101
* Diagnose both _Complex and _Imaginary as C99 extensions.Aaron Ballman2019-08-276-16/+28
| | | | llvm-svn: 370100
* [driver][xray] fix the macOS support checker by supporting -macosAlex Lorenz2019-08-272-1/+5
| | | | | | | | | | | triple in addition to -darwin The previous check incorrectly checked for macOS support by allowing -darwin triples only, and -macos triple was not supported. Differential Revision: https://reviews.llvm.org/D61758 llvm-svn: 370093
* Move EH spec mismatches under -fms-compatibilityReid Kleckner2019-08-275-51/+52
| | | | | | | | | | | | | | | | | | | | | -fms-extensions is intended to enable conforming language extensions and -fms-compatibility is intended to language rule relaxations, so a user could plausibly compile with -fno-ms-compatibility on Windows while still using dllexport, for example. This exception specification validation behavior has been handled as a warning since before -fms-compatibility was added in 2011. I think it's just an oversight that it hasn't been moved yet. This will help users find conformance issues in their code such as those found in _com_ptr_t as described in https://llvm.org/PR42842. Reviewers: hans Subscribers: STL_MSFT, cfe-commits Differential Revision: https://reviews.llvm.org/D66770 llvm-svn: 370087
* Change the X86 datalayout to add three address spaces for 32 bit signed,Amy Huang2019-08-2716-35/+44
| | | | | | 32 bit unsigned, and 64 bit pointers. llvm-svn: 370083
* Use FileEntryRef for PPCallbacks::HasIncludeAlex Lorenz2019-08-274-5/+39
| | | | | | | | This fixes the issue where a filename dependendency was missing if the file that was referenced with __has_include() was accessed through a symlink in an earlier run, if the file manager was reused between runs. llvm-svn: 370081
* [RISCV] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for RV32/RV64 ↵Sam Elliott2019-08-274-0/+260
| | | | | | | | | | | | | | | | | | targets with atomics Summary: This ensures that libcalls aren't generated when the target supports atomics. Atomics aren't in the base RV32I/RV64I instruction sets, so MaxAtomicInlineWidth and MaxAtomicPromoteWidth are set only when the atomics extension is being targeted. This must be done in setMaxAtomicWidth, as this should be done after handleTargetFeatures has been called. Reviewers: jfb, jyknight, wmi, asb Reviewed By: asb Subscribers: pzheng, MaskRay, s.egerton, lenary, dexonsmith, psnobl, benna, Jim, JohnLLVM, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, lewis-revill, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57450 llvm-svn: 370073
* Update the SARIF exporter to SARIF 2.1Joe Ranieri2019-08-274-152/+141
| | | | | | | | | | This updates the SARIF exporter to produce SARIF 2.1 output. The bulk of the diffs come from two changes to SARIF: * https://github.com/oasis-tcs/sarif-spec/issues/309 * https://github.com/oasis-tcs/sarif-spec/issues/179 Differential Revision: https://reviews.llvm.org/D65211 llvm-svn: 370068
* Replace some custom C11 extension warnings with the generic warning.Aaron Ballman2019-08-277-40/+46
| | | | llvm-svn: 370066
* Fix a SARIF exporter crash with macro expansionsJoe Ranieri2019-08-273-25/+153
| | | | | | Differential Revision: https://reviews.llvm.org/D65209 llvm-svn: 370061
* Fix text range end columns in SARIF to be exclusiveJoe Ranieri2019-08-273-17/+20
| | | | | | | | According to the SARIF specification, "a text region does not include the character specified by endColumn". Differential Revision: https://reviews.llvm.org/D65206 llvm-svn: 370060
* Quote the token being diagnosed for C11 extensions.Aaron Ballman2019-08-274-31/+31
| | | | llvm-svn: 370059
* Speculatively fix the build bots after r370052.Aaron Ballman2019-08-271-4/+4
| | | | llvm-svn: 370058
OpenPOWER on IntegriCloud