summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [Syntax] Unset IsOriginal flag on nodes removed from the treeIlya Biryukov2020-01-142-8/+22
| | | | | | And add a corresponding test. Only nodes inside the TranslationUnit subtree can be marked as original, computeReplacements() relies on this.
* [Syntax] Mark synthesized nodes as modifiableIlya Biryukov2020-01-143-0/+24
| | | | | This was an oversight in the original patch. Also add corresponding tests.
* [Syntax] Assert invariants on tree structure and fix a bug in mutationsIlya Biryukov2020-01-145-9/+62
| | | | | | | | Add checks for some structural invariants when building and mutating the syntax trees. Fix a bug failing the invariants after mutations: the parent of nodes added into the tree was null.
* [OpenCL] Add MSAA sharing extension builtin functionsSven van Haastregt2020-01-141-0/+37
| | | | | | | Add the MSAA sharing builtin functions from the OpenCL Extension Specification. Patch by Pierre Gondois and Sven van Haastregt.
* Fix "pointer is null" static analyzer warning. NFCI.Simon Pilgrim2020-01-141-1/+2
| | | | Remove Ctx null test as clang static analyzer assumes that this can fail - replace it with an assertion as the pointer is always dereferenced below.
* Fix "pointer is null" static analyzer warnings. NFCI.Simon Pilgrim2020-01-141-1/+1
| | | | Use cast<> instead of cast_or_null<> since the pointers are always dereferenced and cast<> will perform the null assertion for us.
* Remove duplicate variable. NFCI.Simon Pilgrim2020-01-141-1/+0
|
* Merge isa<> and getAs<> calls to fix "pointer is null" static analyzer ↵Simon Pilgrim2020-01-141-6/+5
| | | | warnings. NFCI.
* Fix "pointer is null" static analyzer warnings. NFCI.Simon Pilgrim2020-01-141-4/+2
| | | | Use castAs<> instead of getAs<> since the pointer is dereferenced immediately below and castAs will perform the null assertion for us.
* Fix "null pointer passed to nonnull argument" clang static analyzer ↵Simon Pilgrim2020-01-141-3/+3
| | | | | | warnings. NFCI. Assert that the memcpy arguments are valid.
* Make helper functions static or move them into anonymous namespaces. NFC.Benjamin Kramer2020-01-146-7/+14
|
* [ARM,MVE] Use the new Tablegen `defvar` and `if` statements.Simon Tatham2020-01-141-31/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This cleans up a lot of ugly `foreach` bodges that I've been using to work around the lack of those two language features. Now they both exist, I can make then all into something more legible! In particular, in the common pattern in `ARMInstrMVE.td` where a multiclass defines an `Instruction` instance plus one or more `Pat` that select it, I've used a `defvar` to wrap `!cast<Instruction>(NAME)` so that the patterns themselves become a little more legible. Replacing a `foreach` with a `defvar` removes a level of block structure, so several pieces of code have their indentation changed by this patch. Best viewed with whitespace ignored. NFC: the output of `llvm-tblgen -print-records` on the two affected Tablegen sources is exactly identical before and after this change, so there should be no effect at all on any of the other generated files. Reviewers: MarkMurrayARM, miyuki Reviewed By: MarkMurrayARM Subscribers: kristof.beyls, hiraditya, dmgreen, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D72690
* [RISCV] Fix ILP32D lowering for double+double/double+int return typesJames Clarke2020-01-142-5/+39
| | | | | | | | | | | | | | | | | | Summary: Previously, since these aggregates are > 2*XLen, Clang would think they were being returned indirectly and thus would decrease the number of available GPRs available by 1. For long argument lists this could lead to a struct argument incorrectly being passed indirectly. Reviewers: asb, lenary Reviewed By: asb, lenary Subscribers: luismarques, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, sameer.abuasal, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69590
* [clang] [test] Fix riscv-toolchain-extra to be less picky about pathsMichał Górny2020-01-142-6/+6
| | | | | | | Fix riscv-toolchain-extra tests to pass when CLANG_RESOURCE_DIR is set to another value than the default. Differential Revision: https://reviews.llvm.org/D72591
* try to fix InterfaceStubs/lambda.cpp on Windows after bd8c8827d96f0Nico Weber2020-01-131-1/+2
|
* [DebugInfo] Add another level to DebugInfoKind called ConstructorAmy Huang2020-01-1311-37/+43
| | | | | | | | | The option will limit debug info by only emitting complete class type information when its constructor is emitted. This patch changes comparisons with LimitedDebugInfo to use the new level instead. Differential Revision: https://reviews.llvm.org/D72427
* [clang][IFS][test] Fixing mangled name of a test for Darwin.Puyan Lotfi2020-01-131-1/+1
| | | | | | | Darwin adds an extra '_' before every C/global function mangled name and because of this, this test was breaking on Darwin. This is a fix for commit: https://reviews.llvm.org/D71301
* PR44514: Fix recovery from noexcept with non-convertible expressionsErich Keane2020-01-132-2/+15
| | | | | | | | | | | | We currently treat noexcept(not-convertible-to-bool) as 'none', which results in the typeloc info being a different size, and causing an assert later on in the process. In order to make recovery less destructive, replace this with noexcept(false) and a constructed 'false' expression. Bug Report: https://bugs.llvm.org/show_bug.cgi?id=44514 Differential Revision: https://reviews.llvm.org/D72621
* [ItaniumCXXABI] Make tls wrappers properly comdatMartin Storsjö2020-01-135-10/+14
| | | | | | | | | | | | Just marking a symbol as weak_odr/linkonce_odr isn't enough for actually tolerating multiple copies of it at linking on windows, it has to be made a proper comdat; make it comdat for all platforms for consistency. This should hopefully fix https://bugzilla.mozilla.org/show_bug.cgi?id=1566288. Differential Revision: https://reviews.llvm.org/D71572
* Implement VectorType conditional operator GNU extension.Erich Keane2020-01-1310-51/+621
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC supports the conditional operator on VectorTypes that acts as a 'select' in C++ mode. This patch implements the support. Types are converted as closely to GCC's behavior as possible, though in a few places consistency with our existing vector type support was preferred. Note that this implementation is different from the OpenCL version in a number of ways, so it unfortunately required a different implementation. First, the SEMA rules and promotion rules are significantly different. Secondly, GCC implements COND[i] != 0 ? LHS[i] : RHS[i] (where i is in the range 0- VectorSize, for each element). In OpenCL, the condition is COND[i] < 0 ? LHS[i]: RHS[i]. In the process of implementing this, it was also required to make the expression COND ? LHS : RHS type dependent if COND is type dependent, since the type is now dependent on the condition. For example: T ? 1 : 2; Is not typically type dependent, since the result can be deduced from the operands. HOWEVER, if T is a VectorType now, it could change this to a 'select' (basically a swizzle with a non-constant mask) with the 1 and 2 being promoted to vectors themselves. While this is a change, it is NOT a standards incompatible change. Based on my (and D. Gregor's, at the time of writing the code) reading of the standard, the expression is supposed to be type dependent if ANY sub-expression is type dependent. Differential Revision: https://reviews.llvm.org/D71463
* [clang][IFS] Prevent Clang-IFS from Leaking symbols from inside a block.Puyan Lotfi2020-01-133-0/+23
| | | | | | | | | | | | Built libdispatch with clang interface stubs. Ran into some block related issues. Basically VarDecl symbols can leak out because I wasn't checking the case where a VarDecl is contained inside a BlockDecl (versus a method or function). This patch checks that a VarDecl is not a child decl of a BlockDecl. This patch also does something very similar for c++ lambdas as well. Differential Revision: https://reviews.llvm.org/D71301
* [NFC][clang][IFS] Adding braces to if-statement as prep for D71301.Puyan Lotfi2020-01-131-1/+2
| | | | Just trying to make https://reviews.llvm.org/D71301 look cleaner.
* [Clang] Always set -z now linker option on FuchsiaPetr Hosek2020-01-133-2/+5
| | | | | | This should be the default on Fuchsia. Differential Revision: https://reviews.llvm.org/D70576
* Revert "[ThinLTO] Add additional ThinLTO pipeline testing with new PM"Teresa Johnson2020-01-131-236/+0
| | | | | | | | | | | This reverts commit 2af97be8027a0823b88d4b6a07fc5eedb440bc1f. After attempting to fix bot failures from matching issues (mostly due to inconsistent printing of "llvm::" prefixes on objects, and AnalysisManager objects being printed differntly, I am now seeing some differences I don't understand (real differences in the passes being printed). Giving up at this point to allow the bots to recover. Will revisit later.
* Add a couple of missed wildcards in debug-pass-manager output checkingTeresa Johnson2020-01-131-1/+1
| | | | | | | Along with the previous fix for bot failures from 2af97be8027a0823b88d4b6a07fc5eedb440bc1f, need to add a wildcard in a couple of places where my local output did not print "llvm::" but the bot is.
* Hopefully last fix for bot failuresTeresa Johnson2020-01-131-43/+43
| | | | | | | | | Hopefully final bot fix for last few failures from 2af97be8027a0823b88d4b6a07fc5eedb440bc1f. Looks like sometimes the "llvm::" preceeding objects get printed in the debug pass manager output and sometimes they don't. Replace with wildcard matching.
* Try number 2 for fixing bot failuresTeresa Johnson2020-01-131-8/+8
| | | | | | | | Additional fixes for bot failures from 2af97be8027a0823b88d4b6a07fc5eedb440bc1f. Remove more exact matching on AnalyisManagers, as they can vary. Also allow different orders between LoopAnalysis and BranchProbabilityAnalysis as that can vary due to both being accessed in the parameter list of a call.
* Fix tests for builtbot failuresTeresa Johnson2020-01-131-10/+10
| | | | | | | | | Should fix most of the buildbot failures from 2af97be8027a0823b88d4b6a07fc5eedb440bc1f, by loosening up the matching on the AnalysisProxy output. Added in --dump-input=fail on the one test that appears to be something different, so I can hopefully debug it better.
* [ThinLTO] Add additional ThinLTO pipeline testing with new PMTeresa Johnson2020-01-131-0/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I've added some more extensive ThinLTO pipeline testing with the new PM, motivated by the bug fixed in D72386. I beefed up llvm/test/Other/new-pm-pgo.ll a little so that it tests ThinLTO pre and post link with PGO, similar to the testing for the default pipelines with PGO. Added new pre and post link PGO tests for both instrumentation and sample PGO that exhaustively test the pipelines at different optimization levels via opt. Added a clang test to exhaustively test the post link pipeline invoked for distributed builds. I am currently only testing O2 and O3 since these are the most important for performance. It would be nice to add similar exhaustive testing for full LTO, and for the old PM, but I don't have the bandwidth now and this is a start to cover some of the situations that are not currently default and were under tested. Reviewers: wmi Subscribers: mehdi_amini, inglorion, hiraditya, steven_wu, dexonsmith, jfb, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D72538
* [Clang][Driver] Re-use the calling process instead of creating a new process ↵Alexandre Ganea2020-01-1313-44/+157
| | | | | | | | | | | | | | | for the cc1 invocation With this patch, the clang tool will now call the -cc1 invocation directly inside the same process. Previously, the -cc1 invocation was creating, and waiting for, a new process. This patch therefore reduces the number of created processes during a build, thus it reduces build times on platforms where process creation can be costly (Windows) and/or impacted by a antivirus. It also makes debugging a bit easier, as there's no need to attach to the secondary -cc1 process anymore, breakpoints will be hit inside the same process. Crashes or signaling inside the -cc1 invocation will have the same side-effect as before, and will be reported through the same means. This behavior can be controlled at compile-time through the CLANG_SPAWN_CC1 cmake flag, which defaults to OFF. Setting it to ON will revert to the previous behavior, where any -cc1 invocation will create/fork a secondary process. At run-time, it is also possible to tweak the CLANG_SPAWN_CC1 environment variable. Setting it and will override the compile-time setting. A value of 0 calls -cc1 inside the calling process; a value of 1 will create a secondary process, as before. Differential Revision: https://reviews.llvm.org/D69825
* Fix cppcheck uninitialized variable in DiffTree() constructor warning. NFCI.Simon Pilgrim2020-01-131-2/+1
|
* Merge isVectorType() and getAs<VectorType> calls to silence clang static ↵Simon Pilgrim2020-01-131-2/+1
| | | | analyzer warning. NFCI.
* Fix some cppcheck shadow variable warnings. NFCI.Simon Pilgrim2020-01-131-15/+13
|
* Fix "pointer is null" static analyzer warnings. NFCI.Simon Pilgrim2020-01-131-2/+2
| | | | Use castAs<> instead of getAs<> since the pointers are always dereferenced and castAs will perform the null assertion for us.
* Sema::getOwningModule - take const Decl* type.Simon Pilgrim2020-01-132-5/+6
| | | | Fixes static analyzer warning that const_cast was being used despite only const methods being called.
* [clang] Remove raw string literals in macrosOliver Stannard2020-01-132-86/+96
| | | | | Older (but still supported) versions of GCC don't handle C++11 raw string literals in macro parameters correctly.
* This option allows selecting the TLS size in the local exec TLS model,KAWASHIMA Takahiro2020-01-136-0/+48
| | | | | | | | | | | | | | | | | | which is the default TLS model for non-PIC objects. This allows large/ many thread local variables or a compact/fast code in an executable. Specification is same as that of GCC. For example, the code model option precedes the TLS size option. TLS access models other than local-exec are not changed. It means supoort of the large code model is only in the local exec TLS model. Patch By KAWASHIMA Takahiro (kawashima-fj <t-kawashima@fujitsu.com>) Reviewers: dmgreen, mstorsjo, t.p.northover, peter.smith, ostannard Reviewd By: peter.smith Committed by: peter.smith Differential Revision: https://reviews.llvm.org/D71688
* Revert "[DWARF5][clang]: Added support for DebugInfo generation for auto ↵Sam McCall2020-01-133-43/+11
| | | | | | | | | return type for C++ member functions." This reverts commit 6d6a4590c5d4c7fc7445d72fe685f966b0a8cafb, which introduces a crash. See https://reviews.llvm.org/D70524 for details.
* [DWARF5][clang]: Added support for DebugInfo generation for auto return type ↵Awanish Pandey2020-01-133-11/+43
| | | | | | | | | | | | | | | | | for C++ member functions. Summary: This patch will provide support for auto return type for the C++ member functions. This patch includes clang side implementation of this feature. Patch by: Awanish Pandey <Awanish.Pandey@amd.com> Reviewers: dblaikie, aprantl, shafik, alok, SouraVX, jini.susan.george Reviewed by: dblaikie Differential Revision: https://reviews.llvm.org/D70524
* Fix "pointer is null" static analyzer warnings. NFCI.Simon Pilgrim2020-01-121-2/+2
| | | | Use castAs<> instead of getAs<> since the pointers are dereferenced immediately and castAs will perform the null assertion for us.
* Fix "pointer is null" static analyzer warning. NFCI.Simon Pilgrim2020-01-121-0/+1
|
* Fix "pointer is null" static analyzer warnings. NFCI.Simon Pilgrim2020-01-121-8/+9
| | | | Use cast<> instead of dyn_cast<> and move into its users where its dereferenced immediately.
* Add -Wrange-loop-analysis changes to ReleaseNotesMark de Wever2020-01-111-0/+4
| | | | This reflects the recent changes done.
* Revert "[ASTMatchers] extract public matchers from const-analysis into own ↵Jonas Toth2020-01-114-410/+0
| | | | | | | | patch" This reverts commit 4c48ea68e491cb42f1b5d43ffba89f6a7f0dadc4. The powerpc buildbots had an internal compiler error after this patch. This requires some inspection.
* [ASTMatchers] extract public matchers from const-analysis into own patchJonas Toth2020-01-114-0/+410
| | | | | | | | | | | | | | | | | | | Summary: The analysis for const-ness of local variables required a view generally useful matchers that are extracted into its own patch. They are `decompositionDecl` and `forEachArgumentWithParamType`, that works for calls through function pointers as well. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72505
* GlobalModuleIndex - Fix use-after-move clang static analyzer warning.Simon Pilgrim2020-01-111-4/+5
| | | | Shadow variable names meant we were referencing the Buffer input argument, not the GlobalModuleIndex member that its std::move()'d it.
* Fix "pointer is null" static analyzer warnings. NFCI.Simon Pilgrim2020-01-111-6/+6
| | | | Use castAs<> instead of getAs<> since the pointers are dereferenced immediately and castAs will perform the null assertion for us.
* Fix "pointer is null" static analyzer warning. NFCI.Simon Pilgrim2020-01-111-1/+1
| | | | Use cast<> instead of dyn_cast<> since we know that the pointer should be valid (and is dereferenced immediately).
* Fix "pointer is null" static analyzer warning. NFCI.Simon Pilgrim2020-01-111-1/+1
| | | | Use castAs<> instead of getAs<> since the pointer is dereferenced immediately within mangleCallingConvention and castAs will perform the null assertion for us.
* Fix "pointer is null" static analyzer warnings. NFCI.Simon Pilgrim2020-01-113-17/+10
| | | | Use castAs<> instead of getAs<> since the pointer is dereferenced immediately below and castAs will perform the null assertion for us.
OpenPOWER on IntegriCloud