- Jun 16, 2022
-
-
lorenzo chelini authored
- Post (minor) fix after: https://reviews.llvm.org/D127301 Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D127868
-
Pengxuan Zheng authored
It seems to be a bug in `LinkerDriver::findFile`, the file name is not converted to lowercase when being inserted into `visitedLibs`. This is the only exception in the file and all other places always convert file names to lowercase when inserting them into `visitedLibs` (or `visitedFiles`). Reviewed By: thieta, hans Differential Revision: https://reviews.llvm.org/D127709
-
Paul Robinson authored
-
Juergen Ributzka authored
The exports trie parser ordinal validation check doesn't consider the case where the ordinal can be zero or negative for certain special values that are defined in BindSpecialDylib. Update the validation to account for that fact and add a test case. This fixes rdar://94844233. Differential Revision: https://reviews.llvm.org/D127806
-
Joseph Huber authored
The offload binary contains internally a string map of all the key and value pairs identified in the binary itself. Normally users query these values from the `getString` function, but this makes it difficult to identify which strings are availible. This patch adds a simple const iterator range to the offload binary allowing users to iterate through the strings. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D127774
-
Stanislav Gatev authored
This makes it harder to misuse APIs that return references by accidentally copying the results which could happen when assigning the them to variables declared as `auto`. Differential Revision: https://reviews.llvm.org/D127865 Reviewed-by: ymandel, xazax.hun
-
Mark de Wever authored
Reviewed By: #libc, philnik Differential Revision: https://reviews.llvm.org/D127675
-
Thomas Raoux authored
Make the reduction distribution pattern more generic and remove layering problem. The new pattern to distribute reduction is now independent of GPU and takes a lamdba to decide how the distributed reduction should be generated. Differential Revision: https://reviews.llvm.org/D127867
-
Paul Robinson authored
-
- Jun 15, 2022
-
-
Luo, Yuanke authored
The use operand may be undefined. In that case we can just continue to check the next operand since it won't increase register pressure. Differential Revision: https://reviews.llvm.org/D127848
-
Balazs Benics authored
The arithmetic restriction seems to be artificial. The comment below seems to be stale. Thus, we remove both. Depends on D127306. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D127763
-
Balazs Benics authored
Previously, system globals were treated as immutable regions, unless it was the `errno` which is known to be frequently modified. D124244 wants to add a check for stores to immutable regions. It would basically turn all stores to system globals into an error even though we have no reason to believe that those mutable sys globals should be treated as if they were immutable. And this leads to false-positives if we apply D124244. In this patch, I'm proposing to treat mutable sys globals actually mutable, hence allocate them into the `GlobalSystemSpaceRegion`, UNLESS they were declared as `const` (and a primitive arithmetic type), in which case, we should use `GlobalImmutableSpaceRegion`. In any other cases, I'm using the `GlobalInternalSpaceRegion`, which is no different than the previous behavior. --- In the tests I added, only the last `expected-warning` was different, compared to the baseline. Which is this: ```lang=C++ void test_my_mutable_system_global_constraint() { assert(my_mutable_system_global > 2); clang_analyzer_eval(my_mutable_system_global > 2); // expected-warning {{TRUE}} invalidate_globals(); clang_analyzer_eval(my_mutable_system_global > 2); // expected-warning {{UNKNOWN}} It was previously TRUE. } void test_my_mutable_system_global_assign(int x) { my_mutable_system_global = x; clang_analyzer_eval(my_mutable_system_global == x); // expected-warning {{TRUE}} invalidate_globals(); clang_analyzer_eval(my_mutable_system_global == x); // expected-warning {{UNKNOWN}} It was previously TRUE. } ``` --- Unfortunately, the taint checker will be also affected. The `stdin` global variable is a pointer, which is assumed to be a taint source, and the rest of the taint propagation rules will propagate from it. However, since mutable variables are no longer treated immutable, they also get invalidated, when an opaque function call happens, such as the first `scanf(stdin, ...)`. This would effectively remove taint from the pointer, consequently disable all the rest of the taint propagations down the line from the `stdin` variable. All that said, I decided to look through `DerivedSymbol`s as well, to acquire the memregion in that case as well. This should preserve the previously existing taint reports. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D127306 -
Phoebe Wang authored
Fixed the missing SQRT promotion. Adding several missing operations too.
-
Balazs Benics authored
Depends on D125709 Reviewed By: martong Differential Revision: https://reviews.llvm.org/D127742
-
Balazs Benics authored
Initially, I thought there is some fundamental bug here by not using the bool fields, but it turns out D55425 split this checker into two separate ones; making these fields dead. Depends on D127836, which uncovered this issue. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D127838
-
Balazs Benics authored
The `Profile` function was incorrectly implemented. The `StreamErrorState` has an implicit `bool` conversion operator, which will result in a different hash than faithfully hashing the raw value of the enum. I don't have a test for it, since it seems difficult to find one. Even if we would have one, any change in the hashing algorithm would have a chance of breaking it, so I don't think it would justify the effort. Depends on D127836, which uncovered this issue by marking the related `Profile` function dead. Reviewed By: martong, balazske Differential Revision: https://reviews.llvm.org/D127839
-
Balazs Benics authored
Thanks @kazu for helping me clean these parts in D127799. I'm leaving the dump methods, along with the unused visitor handlers and the forwarding methods. The dead parts actually helped to uncover two bugs, to which I'm going to post separate patches. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D127836
-
Valentin Clement authored
Fix some mismatch in format used in the file and reduce the diff with fir-dev to be able to finish the upstreaming on this file. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld, kiranchandramohan Differential Revision: https://reviews.llvm.org/D127849
-
Matthias Springer authored
When specifying an op attribute with a default value (via DefaultValuedAttr), the default value is a string of C++ code. In the general case, the default value of such an attribute cannot be translated to Python when generating the bindings. However, we can hard-code default Python values for frequently-used C++ default values. This change adds a Python default value for empty ArrayAttrs. Differential Revision: https://reviews.llvm.org/D127750
-
Sunho Kim authored
Logs enum name of unsupported relocation type. This also changes elf/x86 to use common util function (getELFRelocationTypeName) inside llvm object module. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D127715
-
Shao-Ce SUN authored
When `riscv64-unknown-linux-gnu-ld` is in the PATH, `clang -### -fuse-ld=ld --target=riscv64-unknown-linux-gnu` will use unknown-linux-gnu-ld first, which causes the error in the lit test. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D127589
-
Kadir Cetinkaya authored
-
Kadir Cetinkaya authored
The alias itself is already included in the definition section of the hover (it's printed as spelled in source code). So it doesn't provide any value when we print the aliases as-is. Fixes https://github.com/clangd/clangd/issues/1134. Differential Revision: https://reviews.llvm.org/D127832
-
Krasimir Georgiev authored
Revert "[ARM][Thumb] Command-line option to ensure AAPCS compliant Frame Records AND [NFC][Thumb] Update frame-chain codegen test to use thumbv6m" This reverts commit 7625e01d and dependent cbcce82e. Commit 7625e01d causes some new codegen test failures under asan, e.g., CodeGen/ARM/execute-only.ll: https://lab.llvm.org/buildbot/#/builders/5/builds/24659/steps/15/logs/stdio.
-
Gabor Marton authored
[analyzer][NFC][test] Add new RUN line with support-symbolic-integer-casts=true to expr-inspection.cpp Added a new run line to bolster gradual transition of handling cast operations, see https://discourse.llvm.org/t/roadmap-of-modeling-symbolic-cast-operations/63107 Differential Revision: https://reviews.llvm.org/D127649
-
Timm Bäder authored
Instead of just complaining that "x is not a class, namespace or enumeration", mention that using x requires template arguments. Differential Revision: https://reviews.llvm.org/D127638 Fixes https://github.com/llvm/llvm-project/issues/55962
-
Timm Bäder authored
-
Alvin Wong authored
The WinAPI `GetFinalPathNameByHandle` is used to retrieve the DLL file name from the HANDLE provided to `LOAD_DLL_DEBUG_EVENT` in the debug loop. When this API fails, lldb will simply ignore that module. Certain ramdisk (e.g. ImDisk) does not work with this API, which means it is impossible to use lldb to debug a process which loads DLLs located on this type of ramdisk. In order to make this work, we need to use a fallback routine which involves creating a file mapping, using `GetMappedFileName` to get a device path, then substitutes the device path with its drive letter. References: * https://developercommunity.visualstudio.com/t/cannot-debug-program-when-compiled-to-ram-drive/43004#T-N109926 * https://github.com/jrfonseca/drmingw/issues/65 * https://docs.microsoft.com/en-us/windows/win32/memory/obtaining-a-file-name-from-a-file-handle Reviewed By: labath Differential Revision: https://reviews.llvm.org/D126657
-
Furkan Usta authored
Fixes https://github.com/clangd/clangd/issues/1137 Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D127629
-
Martin Storsjö authored
Since binutils 2.36, GNU ld defaults to emitting base relocations, and that version added the new option --disable-reloc-section to disable it. Differential Revision: https://reviews.llvm.org/D127478
-
Martin Storsjö authored
Before bb94611d, we didn't check that the sections in the COFF executable actually contained enough raw data, when looking up what section contains tables pointed to by the data directories. That commit added checking, to avoid setting a pointer that points out of bounds - by rejecting such executables. It turns out that some binaries (e.g.g a "helper.exe" provided by NSIS) contains a base relocation table data directory that points into the wrong section. It points inside the virtual address space allocated for that section, but the section contains much less raw data, and the table points outside of the provided raw data. No longer reject such binaries (to let tools operate on them and inspect them), but don't set the table pointers (so that when printing e.g. base relocations, we don't print anything). This should fix the regression pointed out in https://reviews.llvm.org/D126898#...
-
Alexey Bataev authored
We can skip the analysis of the constant nodes, their order should not affect the ordering of the trees/subtrees. Differential Revision: https://reviews.llvm.org/D127775
-
PeixinQiao authored
For BIND(C) statement, two common block with the same name can have the same bind name. Fix the regression failure by adding this check. Also add the regression tests. Co-authored-by:
Jean Perier <jperier@nvidia.com> Reviewed By: clementval Differential Revision: https://reviews.llvm.org/D127841
-
Alex Zinenko authored
Add static assertions into the various `attachInterface` methods, which are used for adding external interface implementations to attributes, operations and types, that ensure `ExternalModel` interface classes are instantiated for the same concrete operation for the concrete base (potentially self) attribute or type as they are attached to. `FallbackModel`s remain usable for generic interface models that should support more than one kind of entities. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D127850
-
Alex Zinenko authored
-
Elena Lepilkina authored
Precommit test for D127727
-
Guillaume Chatelet authored
-
Gabor Marton authored
[analyzer][NFC][test] Add new RUN lint with support-symbolic-integer-casts=true to svalbuilder-rearrange-comparisons.c Added a new run line to bolster gradual transition of handling cast operations, see https://discourse.llvm.org/t/roadmap-of-modeling-symbolic-cast-operations/63107 Differential Revision: https://reviews.llvm.org/D127646
-
Nico Weber authored
-
Nico Weber authored
-