- Jun 12, 2020
-
-
Stanislav Mekhanoshin authored
-
Richard Smith authored
declaration is not visible. In passing, add a test for a similar case of conflicting redeclarations of internal-linkage structured bindings. (This case already works).
-
Erich Keane authored
We were using llvm::SmallPtrSet for our ODR-use set which was also used for instantiating the implicit lambda captures. The order in which the captures are added depends on this, so the lambda's layout ended up changing. The test just uses floats, but this was noticed with other types as well. This test replaces the short-lived SmallPtrSet (it lasts only for an expression, which, though is a long time for lambdas, is at least not forever) with a SmallSetVector.
-
Sam McCall authored
Summary: DelayedTemplateParsing is marked as BENIGN_LANGOPT, so we are allowed to use a delayed template in a non-delayed TU. (This is clangd's default configuration on windows: delayed-template-parsing is on for the preamble and forced off for the current file) However today clang fails to parse implicit instantiations in a non-dtp TU of templates defined in a dtp PCH file (and presumably module?). In this case the delayed parser is not registered, so the function is simply marked "delayed" again. We then hit an assert: end of TU template instantiation should not create more late-parsed templates Reviewers: rsmith Subscribers: ilya-biryukov, usaxena95, cfe-commits, kadircet Tags: #clang Differential Revision: https://reviews.llvm.org/D81474
-
Haojian Wu authored
Reland https://reviews.llvm.org/D76696 All known crashes have been fixed, another attemption. We have rolled out this to all internal users for a while, didn't see big issues, we consider it is stable enough. Reviewed By: sammccall Subscribers: rsmith, hubert.reinterpretcast, ebevhan, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D78350
-
Erich Keane authored
As reported in PR46111, implicit instantiation of a deduction guide causes us to have an elaborated type as the parameter, rather than the dependent type. After review and feedback from @rsmith, this patch solves this problem by wrapping the value in an uninstantiated typedef/type-alias that is instantiated when required later. Differential Revision: https://reviews.llvm.org/D80743
-
Kirstóf Umann authored
Checker dependencies were added D54438 to solve a bug where the checker names were incorrectly registered, for example, InnerPointerChecker would incorrectly emit diagnostics under the name MallocChecker, or vice versa [1]. Since the system over the course of about a year matured, our expectations of what a role of a dependency and a dependent checker should be crystallized a bit more -- D77474 and its summary, as well as a variety of patches in the stack demonstrates how we try to keep dependencies to play a purely modeling role. In fact, D78126 outright forbids diagnostics under a dependency checkers name. These dependencies ensured the registration order and enabling only when all dependencies are satisfied. This was a very "strong" contract however, that doesn't fit the dependency added in D79420. As its summary suggests, this relation is directly in between diagnostics, not modeling -- we'd prefer a more specific warning over a general one. To support this, I added a new dependency kind, weak dependencies. These are not as strict of a contract, they only express a preference in registration order. If a weak dependency isn't satisfied, the checker may still be enabled, but if it is, checker registration, and transitively, checker callback evaluation order is ensured. If you are not familiar with the TableGen changes, a rather short description can be found in the summary of D75360. A lengthier one is in D58065. [1] https://www.youtube.com/watch?v=eqKeqHRAhQM Differential Revision: https://reviews.llvm.org/D80905
-
Alex Bradbury authored
[CodeGen] Increase applicability of ffine-grained-bitfield-accesses for targets with limited native integer widths As pointed out in PR45708, -ffine-grained-bitfield-accesses doesn't trigger in all cases you think it might for RISC-V. The logic in CGRecordLowering::accumulateBitFields checks OffsetInRecord is a legal integer according to the datalayout. RISC targets will typically only have the native width as a legal integer type so this check will fail for OffsetInRecord of 8 or 16 when you would expect the transformation is still worthwhile. This patch changes the logic to check for an OffsetInRecord of a at least 1 byte, that fits in a legal integer, and is a power of 2. We would prefer to query whether native load/store operations are available, but I don't believe that is possible. Differential Revision: https://reviews.llvm.org/D79155
-
Akira Hatanaka authored
Rather than pushing inactive cleanups for the block captures at the entry of a full expression and activating them during the creation of the block literal, just call pushLifetimeExtendedDestroy to ensure the cleanups are popped at the end of the scope enclosing the block expression. rdar://problem/63996471 Differential Revision: https://reviews.llvm.org/D81624
-
John McCall authored
Functions can have local pragmas that override the global settings. We set the flags eagerly based on global settings, but if we emit an expression under the influence of a pragma, we clear the appropriate flags from the function. In order to avoid doing a ton of redundant work whenever we emit an FP expression, configure the IRBuilder to default to global settings, and only reconfigure it when we see an FP expression that's not using the global settings. Patch by Michele Scandale! https://reviews.llvm.org/D80462
-
- Jun 11, 2020
-
-
Bruno Ricci authored
nodes using the new helper functions introduced in 78e636b3.
-
Alexey Bataev authored
Added codegen for scan directives in simd loop. The codegen transforms original code: ``` int x = 0; #pragma omp simd reduction(inscan, +: x) for (..) { <first part> #pragma omp scan inclusive(x) <second part> } ``` into ``` int x = 0; for (..) { int x_priv = 0; <first part> x = x_priv + x; x_priv = x; <second part> } ``` and ``` int x = 0; #pragma omp simd reduction(inscan, +: x) for (..) { <first part> #pragma omp scan exclusive(x) <second part> } ``` into ``` int x = 0; for (..) { int x_priv = 0; <second part> int temp = x; x = x_priv + x; x_priv = temp; <first part> } ``` Differential revision: https://reviews.llvm.org/D78232
-
Leonard Chan authored
This patch contains all of the clang changes from D72959. - Generalize the relative vtables ABI such that it can be used by other targets. - Add an enum VTableComponentLayout which controls whether components in the vtable should be pointers to other structs or relative offsets to those structs. Other ABIs can change this enum to restructure how components in the vtable are laid out/accessed. - Add methods to ConstantInitBuilder for inserting relative offsets to a specified position in the aggregate being constructed. - Fix failing tests under new PM and ASan and MSan issues. See D72959 for background info. Differential Revision: https://reviews.llvm.org/D77592
-
hyd-dev authored
eee944e7 adds the new BuiltinBitCastExpr, but does not set the Code member of ASTStmtWriter. This is not correct and causes an assertion failue in ASTStmtWriter::emit() when building PCHs that contain __builtin_bit_cast. This commit adds serialization::EXPR_BUILTIN_BIT_CAST and handles ASTStmtWriter::Code properly. Differential revision: https://reviews.llvm.org/D80360
-
Alexey Bataev authored
This reverts commit fb80e67f to resolve the issue with asan buildbots.
-
Alexey Bataev authored
Summary: Added codegen for use_device_addr clause. The components of the list items are mapped as a kind of RETURN components and then the returned base address is used instead of the real address of the base declaration used in the use_device_addr expressions. Reviewers: jdoerfert Subscribers: yaxunl, guansong, sstefan1, cfe-commits, caomhin Tags: #clang Differential Revision: https://reviews.llvm.org/D80730
-
Daniel Grumberg authored
Summary: This record is constructed by hashing the bytes of the AST block in a similiar fashion to the SIGNATURE record. This new signature only means anything if the AST block is fully relocatable, i.e. it does not embed absolute offsets within the PCM file. This change ensure this does not happen by replacing these offsets with offsets relative to the nearest relevant subblock of the AST block. Reviewers: Bigcheese, dexonsmith Subscribers: dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80383
-
Alexey Bataev authored
Added codegen for scandirectives in simd loop. The codegen transforms original code: ``` int x = 0; #pragma omp simd reduction(inscan, +: x) for (..) { <first part> #pragma omp scan inclusive(x) <second part> } ``` into ``` int x = 0; for (..) { int x_priv = 0; <first part> x = x_priv + x; x_priv = x; <second part> } ``` and ``` int x = 0; #pragma omp simd reduction(inscan, +: x) for (..) { <first part> #pragma omp scan exclusive(x) <second part> } ``` into ``` int x = 0; for (..) { int x_priv = 0; <second part> int temp = x; x = x_priv + x; x_priv = temp; <first part> } ``` Differential revision: https://reviews.llvm.org/D78232
-
Bruno Ricci authored
...before checking that the default argument is valid with CheckDefaultArgumentVisitor. Currently the restrictions on a default argument are checked with the visitor CheckDefaultArgumentVisitor in ActOnParamDefaultArgument before performing the conversion to the parameter type in SetParamDefaultArgument. This was fine before the previous patch but now some valid code post-CWG 2346 is rejected: void test() { const int i2 = 0; extern void h2a(int x = i2); // FIXME: ok, not odr-use extern void h2b(int x = i2 + 0); // ok, not odr-use } This is because the reference to i2 in h2a has not been marked yet with NOUR_Constant. i2 is marked NOUR_Constant when the conversion to the parameter type is done, which is done just after. The solution is to do the conversion to the parameter type before checking the restrictions on default arguments with CheckDefaultArgumentVisitor. This has the side-benefit of improving some diagnostics. Differential Revision: https://reviews.llvm.org/D81616 Reviewed By: rsmith
-
Bruno Ricci authored
[clang] CWG 2082 and 2346: loosen the restrictions on parameters and local variables in default arguments. This patch implements the resolution of CWG 2082 and CWG 2346. The resolution of CWG 2082 changed [dcl.fct.default]p7 and p9 to allow a parameter or local variable to appear in a default argument if not in a potentially-evaluated expression. The resolution of CWG 2346 changed [dcl.fct.default]p7 to allow a local variable to appear in a default argument if not odr-used. An issue remains after this patch (see the FIXME in test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp). This is addressed by the next patch. Differential Revision: https://reviews.llvm.org/D81615 Reviewed By: rsmith, erichkeane
-
Endre Fülöp authored
Summary: Introduce on-demand parsing of needed ASTs during CTU analysis. The index-file format is extended, and analyzer-option CTUInvocationList is added to specify the exact invocations needed to parse the needed source-files. Reviewers: martong, balazske, Szelethus, xazax.hun, whisperity Reviewed By: martong, xazax.hun Subscribers: gribozavr2, thakis, ASDenysPetrov, ormris, mgorny, whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, steakhal, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75665
-
Fangrui Song authored
This reverts commit 263390d4. This can still cause bogus errors: eigen3/Eigen/src/Core/CoreEvaluators.h:94:38: error: call to implicitly-deleted copy constructor of 'unary_evaluator<Eigen::Inverse<Eigen::Matrix<double, 4, 4, 0, 4, 4>>>' thrust/system/detail/generic/for_each.h:49:3: error: implicit instantiation of undefined template 'thrust::detail::STATIC_ASSERTION_FAILURE<false>'
-
- Jun 10, 2020
-
-
Akira Hatanaka authored
deleted Instead of forcing the class to be passed in registers, which was what r350920 did, issue a warning and inform the user that the attribute cannot be used. For more background, see this discussion: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190128/259907.html This fixes PR39683. rdar://problem/47308221 Differential Revision: https://reviews.llvm.org/D57626
-
Leonard Chan authored
This reverts commit 2e009dbc. Reverting since there were some test failures on buildbots that used the new pass manager. ASan and MSan are also finding some bugs in this that I'll need to address.
-
Leonard Chan authored
This patch contains all of the clang changes from D72959. - Generalize the relative vtables ABI such that it can be used by other targets. - Add an enum VTableComponentLayout which controls whether components in the vtable should be pointers to other structs or relative offsets to those structs. Other ABIs can change this enum to restructure how components in the vtable are laid out/accessed. - Add methods to ConstantInitBuilder for inserting relative offsets to a specified position in the aggregate being constructed. See D72959 for background info. Differential Revision: https://reviews.llvm.org/D77592
-
Leonard Chan authored
`noderef` was failing to trigger warnings in some cases related to c++ style casting. This patch addresses them. Differential Revision: https://reviews.llvm.org/D77836
-
Michael Liao authored
-
Marco Elver authored
The expected strings would previously not catch bugs when redzones were added when they were not actually expected. Fix by adding "global " before the type.
-
Michael Liao authored
Summary: - In HIP, just as the regular device-only compilation, the device-only relocatable code compilation should not involve offload bundle. - In addition, that device-only relocatable code compilation should have the similar 3 steps, namely preprocessor, compile, and backend, to the regular code generation with `-emit-llvm`. Reviewers: yaxunl, tra Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81427
-
Marco Elver authored
Some platforms do not support aliases. Split the test, and pass explicit triple to avoid test failure. Reviewed By: thakis Tags: #clang Differential Revision: https://reviews.llvm.org/D81591
-
Zequan Wu authored
Summary: Bug filed here: https://bugs.llvm.org/show_bug.cgi?id=45213 To resolve it, we let the checks for mangling LambdaContextDecl to be analogous to ItaniumMangle strategy: https://github.com/llvm/llvm-project/blob/master/clang/lib/AST/ItaniumMangle.cpp#L1829 Differential Revision: https://reviews.llvm.org/D80153
-
Endre Fülöp authored
This reverts commit 97e07d0c. Reason: OSX broke for a different reason, this really only seem to work on linux and very generic windows builds
-
serge-sans-paille authored
de02a75e incorrectly upgraded it to v6
-
Ronald Wampler authored
These warnings are grouped under '-Wclass-conversion' to be compatiable with GCC 9. Differential Revision: https://reviews.llvm.org/D78442
-
Marco Elver authored
[ v1 was reverted by c6ec352a due to modpost failing; v2 fixes this. More info: https://github.com/ClangBuiltLinux/linux/issues/1045#issuecomment-640381783 ] This makes -fsanitize=kernel-address emit the correct globals constructors for the kernel. We had to do the following: * Disable generation of constructors that rely on linker features such as dead-global elimination. * Only instrument globals *not* in explicit sections. The kernel uses sections for special globals, which we should not touch. * Do not instrument globals that are prefixed with "__" nor that are aliased by a symbol that is prefixed with "__". For example, modpost relies on specially named aliases to find globals and checks their contents. Unfortunately modpost relies on size stored as ELF debug info and any padding of globals currently causes the debug info to cause size reported to be *with* redzone which throws modpost off. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203493 Tested: * With 'clang/test/CodeGen/asan-globals.cpp'. * With test_kasan.ko, we can see: BUG: KASAN: global-out-of-bounds in kasan_global_oob+0xb3/0xba [test_kasan] * allyesconfig, allmodconfig (x86_64) Reviewed By: glider Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D81390
-
Endre Fülöp authored
Summary: Introduce on-demand parsing of needed ASTs during CTU analysis. The index-file format is extended, and analyzer-option CTUInvocationList is added to specify the exact invocations needed to parse the needed source-files. Reviewers: martong, balazske, Szelethus, xazax.hun, whisperity Reviewed By: martong, xazax.hun Subscribers: gribozavr2, thakis, ASDenysPetrov, ormris, mgorny, whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, steakhal, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75665
-
Endre Fülöp authored
This reverts commit 020815fa. Reason: PS4 buildbot broke
-
Sander de Smalen authored
These ACLE tests were missing in previous patches: - D79357: [SveEmitter] Add builtins for svdup and svindex - D78747: [SveEmitter] Add builtins for compares and ReverseCompare flag. - D76238: [SveEmitter] Implement builtins for contiguous loads/stores
-
Endre Fülöp authored
Summary: Introduce on-demand parsing of needed ASTs during CTU analysis. The index-file format is extended, and analyzer-option CTUInvocationList is added to specify the exact invocations needed to parse the needed source-files. Reviewers: martong, balazske, Szelethus, xazax.hun, whisperity Reviewed By: martong, xazax.hun Subscribers: gribozavr2, thakis, ASDenysPetrov, ormris, mgorny, whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, steakhal, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75665
-
Craig Topper authored
[X86] Assign a feature to tremont, goldmont, goldmont-plus, icelake-client, and icelake for target multiversioning priority. Without this these CPUs all caused the compiler to assert when used for multiversioning.
-