Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoBump] Merge with 8280651a (Sep 17) (5) #419

Merged
merged 187 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
f14fd32
workflows/commit-access-review: Use get_collaborators() function (#10…
tstellar Sep 16, 2024
0a7a1ef
[HLSL] Add `[[hlsl::contained_type()]]` attribute (#108456)
hekota Sep 16, 2024
d95597d
[libc++][string] Remove potential non-trailing 0-length array (#108867)
ldionne Sep 16, 2024
ddd1a02
Revert "[scudo] Update secondary cache time-based release logic (#107…
thurstond Sep 16, 2024
34a4eef
[flang] Warn about impure calls in concurrent headers (#108436)
klausler Sep 16, 2024
eebe9a3
[flang][CUDA] Fix crash in name resolution for CUDA function (#108616)
klausler Sep 16, 2024
50d15e6
[flang] Subnormal arguments to and results from SPACING (#108861)
klausler Sep 16, 2024
9a1d074
Revert "[sanitizer] Fix partially initialized static TLS range" (#108…
vitalybuka Sep 16, 2024
3acb1ea
[lldb-dap] Support inspecting memory (#104317)
vogelsgesang Sep 16, 2024
f13b7d0
Reland "[sanitizer] Fix partially initialized static TLS range" (#108…
vitalybuka Sep 16, 2024
7e56a09
[RISCV] Add a testcase for an unprofitable machine-sink issue
preames Sep 16, 2024
ad06e95
Reapply "[NFC][sanitizer] Switch to `gnu_get_libc_version` (#108724)"…
vitalybuka Sep 16, 2024
6ca5c39
[LLD][COFF] Redirect __imp_ Symbols to __imp_aux_ on ARM64EC for x64 …
cjacek Sep 16, 2024
0975e2a
[LLDB][Minidump] Add a progress bar to minidump (#108309)
Jlalond Sep 16, 2024
dbc5900
[WebAssembly] Fix .functype directives in tests (#108748)
aheejin Sep 16, 2024
4886403
[HLSL] Align language modes on 202x as default (#108662)
llvm-beanz Sep 16, 2024
bffb26f
[ELF] Add LinkerDriver::ctx. NFC
MaskRay Sep 16, 2024
a366323
[RISCV][GISel] Restore s32 support for G_ABS on RV64.
topperc Sep 16, 2024
f022111
[RISCV][GISel] Restore s32 support on RV64 for DIV, and REM.
topperc Sep 16, 2024
d904542
[ELF] Add Config &Ctx::arg. NFC
MaskRay Sep 16, 2024
0cc2cd7
[lldb-dap] Provide `declarationLocation` for variables (#102928)
vogelsgesang Sep 17, 2024
48498ec
[-Wunsafe-buffer-usage] Fix a bug in "Re-land [-Wunsafe-buffer-usage]…
ziqingluo-90 Sep 17, 2024
f99bb02
[SPIR-V] Emit DebugTypeBasic for NonSemantic DI (#106980)
bwlodarcz Sep 17, 2024
c96ee0f
fix update-verify-tests test suite for AIX (#108871)
hnrklssn Sep 17, 2024
7b3d4e3
[NFC][ASan] Replace calls to Report() and Die() with ReportIncompatib…
Enna1 Sep 17, 2024
a20794b
[Sanitizer] Call Die() instead of Abort() when failed to reserve shad…
Enna1 Sep 17, 2024
fab60a6
[NFC][sanitizer] Simplify ThreadDescriptorSizeFallback using early re…
vitalybuka Sep 17, 2024
8982f98
[NFC][sanitizer] Remove `else if` from ThreadDescriptorSizeFallback (…
vitalybuka Sep 17, 2024
5df1b79
[HLSL] Add `[[hlsl::raw_buffer]]` attribute (#107954)
hekota Sep 17, 2024
97ae505
[WebAssembly] Support disassembler for try_table (#108800)
aheejin Sep 17, 2024
64aaf05
[Clang] [Driver] Ensure `-fms-volatile` is set for x86 for `*-windows…
MaxEW707 Sep 17, 2024
884221e
[mlir] Tidy uses of llvm::raw_stream_ostream (NFC)
JOE1994 Sep 16, 2024
95a0b4f
Revert "[clang][ExprConst] Allow comparisons with string literals (#1…
tbaederr Sep 17, 2024
2f7ffba
[Support] Fix bugs in formatv automatic index assignment (#108384)
jurahul Sep 17, 2024
884ff9e
[LegalizeVectorOps] Make the AArch64 hack in ExpandFNEG more specific.
topperc Sep 17, 2024
6af2f22
[RISCV] Restrict combineOp_VLToVWOp_VL w/ bf16 to vfwmadd_vl with zvf…
lukel97 Sep 17, 2024
41f1b46
[RISCV] Account for zvfhmin and zvfbfmin promotion in register usage …
lukel97 Sep 17, 2024
30d7dcc
[RISCV] Add asserts requirement to loop vectorizer tests
lukel97 Sep 17, 2024
827dd1e
[Bolt] Explicitly request PIE in tests (#108818)
nikic Sep 17, 2024
539f916
[Instrumentation] Precommit tests for PR108552 (NFC)
antoniofrighetto Sep 17, 2024
8d8bede
[Bufferization] Avoid repeated hash lookups (NFC) (#108925)
kazutakahirata Sep 17, 2024
65a5b18
[Shape] Avoid repeated hash lookups (NFC) (#108926)
kazutakahirata Sep 17, 2024
9825d1f
[PDL] Avoid repeated hash lookups (NFC) (#108927)
kazutakahirata Sep 17, 2024
71a39ec
[MLProgram] Avoid repeated hash lookups (NFC) (#108928)
kazutakahirata Sep 17, 2024
942e872
[Instrumentation] Do not request sanitizers for naked functions
antoniofrighetto Sep 17, 2024
acfa294
[GlobalIsel] Canonicalize G_FCMP (#108891)
tschuett Sep 17, 2024
c970e96
[libc][bazel] Enable software prefetching for memset (#108860)
gchatelet Sep 17, 2024
c91f2a2
[X86] Consistently use 'k' for predicate mask registers in instructio…
RKSimon Sep 17, 2024
c48a1eb
[LV] Remove force-vector-width/force-vector-interleave from X86 test.
fhahn Sep 17, 2024
f25b091
ValueTracking/test: increase recurrence coverage (#108836)
artagnon Sep 17, 2024
79d380f
[AArch64][SVE2] Add codegen patterns for SVE2 FAMINMAX (#107284)
SpencerAbson Sep 17, 2024
3c5c61a
[LV] Add first order rec test where hoisting can improve over sinking.
fhahn Sep 17, 2024
4de7026
[bazel] Split linux time targets to avoid dependency cycles
d0k Sep 17, 2024
3e32e45
[NVPTX] Verify ptx in the right version
d0k Sep 17, 2024
6357781
[clang-tidy] fix nullptr dereference in bugprone-forwarding-reference…
5chmidti Sep 17, 2024
50320ec
[NFC][clang-tidy] reword diagnostic note in definitions-in-headers (#…
5chmidti Sep 17, 2024
605a9ad
[clang-tidy] fix false positive in modernize-min-max-use-initializer-…
5chmidti Sep 17, 2024
caaac84
[clang-tidy] only diagnose definitions in readability-enum-initial-va…
5chmidti Sep 17, 2024
24ccdc5
[llvm][llvm-as] Fix file input extension description (#108295)
AmrDeveloper Sep 17, 2024
50d55dc
[llvm][llvm-cat] Fix typo in the Input file name option (#108294)
AmrDeveloper Sep 17, 2024
88a9bca
[clang][NFC] Update `cxx_dr_status.html`
Endilll Sep 17, 2024
1e64864
[flang][StackArrays] run in parallel on different functions (#108842)
tblah Sep 17, 2024
270ee65
[Analysis][NFC] Clean-up in ScalarEvolution when copying predicates (…
david-arm Sep 17, 2024
b39a100
[lldb][lldb-dap] Remove unused includes in memory test
DavidSpickett Sep 17, 2024
64cfce9
[MLIR][OpenMP][Docs] Document operand structures (NFC) (#108824)
skatrak Sep 17, 2024
83220e9
[gn build] Add llvm-cgdata dependency to check-lld
BertalanD Sep 17, 2024
731a683
[AMDGPU] Refine operand iterators in the SIInsertWaitcnts. NFCI. (#10…
rampitec Sep 17, 2024
bc8a5d1
[Patchpoint] Add immarg attributes to patchpoint arguments (#97276)
Il-Capitano Sep 17, 2024
1fc288b
[flang][debug] Handle lower bound in assumed size arrays. (#108523)
abidh Sep 17, 2024
1603f99
[libc++] Explicitly convert to masks in SIMD code (#107983)
philnik777 Sep 17, 2024
b1d7694
[AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (…
labrinea Sep 17, 2024
b6f72fc
[flang][debug] Generate correct subroutine type. (#108605)
abidh Sep 17, 2024
20c5432
[flang][Semantics][OpenMP] Don't privatise associate names (#108856)
tblah Sep 17, 2024
72901fe
[AArch64] Fold UBFMXri to UBFMWri when it's an LSR or LSL alias (#106…
Il-Capitano Sep 17, 2024
8411214
[AArch64] Tests for vecreduce.or(sext(x)), with or/and/xor and sext/z…
davemgreen Sep 17, 2024
742e04d
[X86] combineConcatVectorOps - handle *_EXTEND nodes
RKSimon Sep 17, 2024
b222ec1
[X86] vector-reduce-add-mask.ll - regenerate vpmulhuw asm comments. NFC
RKSimon Sep 17, 2024
ce73407
Fix MachineInstr::uses() doc. NFC. (#108950)
rampitec Sep 17, 2024
b1339ab
[InstCombine] Add tests for folding align assumes into load metadata.
fhahn Sep 17, 2024
de1f5b9
[SLP]Vectorize gathered loads
alexey-bataev Sep 17, 2024
b3a2208
[mlir] Apply ClangTidy fixes.
akuegel Sep 17, 2024
1e23a61
[PS4,PS5][Driver] Detangle --sysroot and -isysroot (#107410)
playstation-edd Sep 17, 2024
17a3bdb
[RISCV][docs] Fix List Formatting
lenary Sep 17, 2024
b84c429
[NFC][LoopVectorize] Rename variable in replaceVPBBWithIRVPBB (#108543)
david-arm Sep 17, 2024
d0438d2
[libc++][NFC] Replace uses of NULL by nullptr (#108847)
ldionne Sep 17, 2024
07e0b8a
[ast-matcher] Fixed a crash when traverse lambda expr with invalid ca…
HerrCai0907 Sep 17, 2024
a17a245
[LLD][COFF] Add Support for auxiliary IAT copy (#108610)
cjacek Sep 17, 2024
ab38ec9
[lldb][lldb-dap] Disable read memory test on Windows
DavidSpickett Sep 17, 2024
5fdf07d
[LLVM][TableGen] Change ARMTargetDefEmitter to use const RecordKeeper…
jurahul Sep 17, 2024
8e2dbab
[clang][bytecode] Fix defining extern variables (#108940)
tbaederr Sep 17, 2024
34e16b6
[IndVars] Fix strict weak ordering violation (#108947)
nikic Sep 17, 2024
cb98fd9
Fix use of an uninitialized variable; NFC intended
AaronBallman Sep 17, 2024
49a754a
[Clang] Mark Clang 19 language changes as being released [NFC] (#108978)
cor3ntin Sep 17, 2024
ee2add0
[GISEL] Fix bugs and clarify spec of G_EXTRACT_SUBVECTOR (#108848)
michaelmaitland Sep 17, 2024
d2125e1
[RISCV] Support STRICT_UINT_TO_FP and STRICT_SINT_TO_FP (#102503)
mikhailramalho Sep 17, 2024
2242cd2
[DAG] Fold vecreduce.or(sext(x)) to sext(vecreduce.or(x)) (#108959)
davemgreen Sep 17, 2024
f4172f6
[Clang][AMDGPU] Simplify builtin type definitions. NFC. (#108968)
jayfoad Sep 17, 2024
267ad43
[clang-tidy] Extend `bugprone-sizeof-expression` with matching `P +- …
zporky Sep 17, 2024
b153cc5
[RISCV] Fix boundary error in compress-opt-select.ll
preames Sep 17, 2024
848cec1
Revert "[SLP]Vectorize gathered loads"
nikic Sep 17, 2024
53bc35a
[polly] Tidy uses of raw_string_ostream (NFC)
JOE1994 Sep 17, 2024
6f5dd65
[libc++][docs] Fix inline code style - use double backticks (#108974)
H-G-Hristov Sep 17, 2024
adeae92
[libc++] Make _LIBCPP_ASSUME usable when it is appropriate (#91801)
davidben Sep 17, 2024
c3d78a7
[libc][benchmarks] Tidy uses of raw_string_ostream (NFC)
JOE1994 Sep 17, 2024
c532e6d
[RISCV] Restructure compress-opt-select.ll
preames Sep 17, 2024
8663a75
[AMDGPU] Add link to RDNA 3.5 docs (#108977)
jayfoad Sep 17, 2024
78f7aae
[VirtRegMap] Remove unused MAX_STACK_SLOT. NFC (#108781)
topperc Sep 17, 2024
f36580f
[LegalizeVectorOps] Remove calls to DAG.UnrollVectorsOps from some ex…
topperc Sep 17, 2024
0f97b48
[Scalarizer][DirectX] Add support for scalarization of Target intrin…
farzonl Sep 17, 2024
2e7c7d2
[RISCV][TTI] Adjust cost for extract/insert element when VLEN is know…
preames Sep 17, 2024
55808d8
[AVR] Use MCRegister in AsmParser. NFC
topperc Sep 17, 2024
594579b
[RISCV] Autogenerate compress-opt-select.ll
preames Sep 17, 2024
09fc178
[RISCV] Add scheduling model for Syntacore SCR7 (#108814)
asi-sc Sep 17, 2024
433bc6b
[NFC][TableGen] Adopt formatv() automatic index in IntrinsicEmitter (…
jurahul Sep 17, 2024
100b34b
[LLVM][TableGen] Change VarLenCodeEmitterGen to use const RecordKeepe…
jurahul Sep 17, 2024
da46244
Revert "[LegalizeVectorOps] Make the AArch64 hack in ExpandFNEG more …
topperc Sep 17, 2024
e5bc842
[NFC][sanitizer] Remove #elif to simplify ThreadDescriptorSizeFallbac…
vitalybuka Sep 17, 2024
3d87e21
[NFC][sanitizer] Consolidate version checking branches of ThreadDescr…
vitalybuka Sep 17, 2024
0050503
[clang][bytecode] Allow right-shift of negative values (#108987)
tbaederr Sep 17, 2024
a0d00c9
[SimplifyCFG] Swap range metadata to attribute for calls. (#108984)
andjo403 Sep 17, 2024
2bda9e1
[docs][clang-tidy] Correct StrictMode example in modernize-use-std-pr…
MainakSil Sep 17, 2024
6b3b63c
[libc++] Avoid synchronizing status files for "In Progress" issues
ldionne Sep 17, 2024
ac11945
[mlir][GPU] block_id has the grid size as its range
d0k Sep 17, 2024
e1971a8
[lldb][intel-pt] Fix build error on conversion from llvm::Error to St…
kusmour Sep 17, 2024
b9e1304
[libc] add `ctime` and `ctime_r` to `date_and_time` documentation (#1…
Sep 17, 2024
12b88f8
[libc++][NFC] Mark P1424R1 as partially implemented (#107751)
H-G-Hristov Sep 17, 2024
ae8d020
[SimplifyCFG] Add test for sinking div/rem with const remainder; NFC
goldsteinn Sep 17, 2024
419c534
[SimplifyCFG] Mark div/rem as not-cheap to sink if we are replacing c…
goldsteinn Sep 17, 2024
c23d6df
[AArch64] Don't define reserved macros
d0k Sep 17, 2024
a729e70
[HLSL] set alwaysinline on HLSL functions (#106588)
pow2clk Sep 17, 2024
6497283
[RISCV][GISEL] Introduce the RISCVPostLegalizerLowering pass (#108991)
michaelmaitland Sep 17, 2024
d5dd7d2
[flang] Tidy uses of raw_string_ostream (NFC)
JOE1994 Sep 17, 2024
b9bf831
[SandboxIR] Implement GlobalVariable (#108642)
vporpo Sep 17, 2024
090850f
[AArch64][CostModel] Add NFC tests for extractelement cost (#108941)
sushgokh Sep 17, 2024
51a29b5
Revert2 "[DebugInfo][DWARF] Set is_stmt on first non-line-0 instructi…
SLTozer Sep 17, 2024
d3532d1
[bazel] Port 64972834c193632cbc47e54c0f0c721636b077e6
d0k Sep 17, 2024
6153582
[X86] combineX86ShuffleChainWithExtract - peek through insert_subvect…
RKSimon Sep 17, 2024
f4fe26d
[HLSL] update StructuredBuffer subscript test for alwaysinline (#109023)
pow2clk Sep 17, 2024
2c69a09
[NFC][sanitizer] Move ThreadDescriptorSize into GLIBC/FREEBSD block (…
vitalybuka Sep 17, 2024
39a4b32
[NFC] Move warning from CodeGen to Sema. (#107397)
zahiraam Sep 17, 2024
0bbebf6
[flang][cuda] Convert cuf.data_transfer with descriptors (#108890)
clementval Sep 17, 2024
71a91c1
[tsan] Use DlSymAllocator (#108920)
vitalybuka Sep 17, 2024
6b78ea8
[X86] Complete AMD znver4 AVX512 zeroing idioms (#108740)
boomanaiden154 Sep 17, 2024
1ebe16b
[RISCV] Add VL optimization related tests
michaelmaitland Sep 17, 2024
c4a42f6
[libc++] Fix the declarative generation of FTMs (#108843)
ldionne Sep 17, 2024
defb8fb
[WebAssembly] Support assembly parsing for new EH (#108668)
aheejin Sep 17, 2024
318d2f5
[SandboxVec][DAG] Boilerplate (#108862)
vporpo Sep 17, 2024
fd26f84
[mlir][gpu] Rename two misspelled pattern population functions (#109015)
andfau-amd Sep 17, 2024
09284e7
[Clang] Reject `this void` explicit object parameters (CWG2915) (#108…
MitalAshok Sep 17, 2024
1cce1b4
[gn] port 318d2f5e5d4d8 (SandboxVectorizerTests)
nico Sep 17, 2024
98cf656
[gn build] Port 64972834c193
nico Sep 17, 2024
1c0958b
[flang][Driver] Support -nostdlib and -nodefaultlibs (#108868)
tarunprabhu Sep 17, 2024
5bb1ce8
[NFC][sanitizer] Make `GetLibcVersion` `void` (#108915)
vitalybuka Sep 17, 2024
c8fcfe1
[SandboxIR][NFC] Fix unittest build warning in release
vporpo Sep 17, 2024
815b004
[clang][OpenMP] Slightly refactor EndOpenMPDSABlock for readability, …
kparzysz Sep 17, 2024
9a312d4
[SandboxIR] Implement GlobalAlias (#109019)
vporpo Sep 17, 2024
783d323
[VirtRegMap] Replace a single value enum with a static constexpr memb…
topperc Sep 17, 2024
e08c217
[MachineVerifier] Fix bug in MachineVerifier for G_INSERT_SUBVECTOR (…
michaelmaitland Sep 17, 2024
4a63f4d
Revert "[HLSL] set alwaysinline on HLSL functions (#106588)"
thurstond Sep 17, 2024
a1d6462
[MLIR][IR] Fix InProgressAliasInfo init for non-alias (#109013)
zyx-billy Sep 17, 2024
9e709dc
[NFC][Glob] Escape backslash to fix doxygen rendering (#109055)
ellishg Sep 17, 2024
0ea40bf
Revert "[libc++] Explicitly convert to masks in SIMD code (#107983)"
thurstond Sep 17, 2024
905de9b
[HLSL] Add testing for space parameter on global constants (#106782)
bob80905 Sep 17, 2024
38333f4
[WebAssembly] Support annotation for try_table (#109029)
aheejin Sep 17, 2024
08bba65
[WebAssembly] Support binary generation for new EH (#109027)
aheejin Sep 17, 2024
04575dc
[mlir] [tblgen-to-irdl] Add types to tblgen-to-irdl script (#108558)
alexarice Sep 17, 2024
9c9a627
[ThinLTO] Add lookup to ImportListsTy (#109036)
kazutakahirata Sep 17, 2024
b846638
[SanbdoxIR] Implement BBIterator::getNodeParent() (#109039)
vporpo Sep 17, 2024
790f2eb
[InstCombine] Avoid simplifying bitcast of undef to a zeroinitializer…
AlexMaclean Sep 17, 2024
3aecf41
[SandboxVec] Add barebones Region class. (#108899)
slackito Sep 17, 2024
aa2e6b8
Revert "[SandboxVec] Add barebones Region class." (#109058)
slackito Sep 17, 2024
da03d17
Revert "[HLSL] update StructuredBuffer subscript test for alwaysinlin…
thurstond Sep 17, 2024
4a0bf83
Reapply "[HLSL] update StructuredBuffer subscript test for alwaysinli…
thurstond Sep 17, 2024
b89bb77
Reapply "[HLSL] set alwaysinline on HLSL functions (#106588)"
thurstond Sep 17, 2024
ca0613e
[LegalizeFloatTypes] Handle replacement for strict ops inside SoftPro…
topperc Sep 17, 2024
785624b
[clang-tidy]suggest use `std::span` as replacement of c array in C++2…
HerrCai0907 Sep 18, 2024
42c5a30
[SandboxVec] Legality boilerplate (#108650)
vporpo Sep 18, 2024
773353b
[bolt][tests] Skip tests that use perf when perf counters are unavail…
tstellar Sep 18, 2024
45a8e36
[gn build] Port 42c5a301f599
llvmgnsyncbot Sep 18, 2024
b2d3c31
[ctx_prof] Fix checks in `PGOCtxprofFlattening` (#108467)
mtrofin Sep 18, 2024
51d913a
[sanitizer] Remove CHECK from __sanitizer_get_dtls_size
vitalybuka Sep 18, 2024
da0b9db
[ELF] Replace config-> with ctx.arg. NFC
MaskRay Sep 18, 2024
33533ba
[alpha.webkit.UncountedCallArgsChecker] Add support for Objective-C++…
rniwa Sep 18, 2024
7046a9f
[C++20] [Modules] Treat in class defined member functions in language…
ChuanqiXu9 Sep 18, 2024
0f77bdd
[HLSL] generate hlsl.wavesize attribute (#107176)
python3kgae Sep 18, 2024
8280651
[llvm] [Demangle] Fix MSVC demangling for placeholder return types (#…
MaxEW707 Sep 18, 2024
a95f088
[AutoBump] Merge with 8280651a (Sep 17)
jorickert Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 2 additions & 3 deletions .github/workflows/commit-access-review.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,10 @@ def main():
gh = github.Github(login_or_token=token)
org = gh.get_organization("llvm")
repo = org.get_repo("llvm-project")
team = org.get_team_by_slug("llvm-committers")
one_year_ago = datetime.datetime.now() - datetime.timedelta(days=365)
triage_list = {}
for member in team.get_members():
triage_list[member.login] = User(member.login, triage_list)
for collaborator in repo.get_collaborators(permission="push"):
triage_list[collaborator.login] = User(collaborator.login, triage_list)

print("Start:", len(triage_list), "triagers")
# Step 0 Check if users have requested commit access in the last year.
Expand Down
4 changes: 2 additions & 2 deletions bolt/test/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
host_linux_triple = config.target_triple.split("-")[0] + "-unknown-linux-gnu"
common_linker_flags = "-fuse-ld=lld -Wl,--unresolved-symbols=ignore-all"
flags = f"--target={host_linux_triple} {common_linker_flags}"
common_linker_flags = "-fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -pie"
flags = f"--target={host_linux_triple} -fPIE {common_linker_flags}"

config.substitutions.insert(0, ("%cflags", f"%cflags {flags}"))
config.substitutions.insert(0, ("%cxxflags", f"%cxxflags {flags}"))
5 changes: 3 additions & 2 deletions bolt/test/perf2bolt/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import shutil
import subprocess

if shutil.which("perf") is not None:
config.available_features.add("perf")
if shutil.which("perf") is not None and subprocess.run(["perf", "record", "-e", "cycles:u", "-o", "/dev/null", "--", "perf", "--version"], capture_output=True).returncode == 0:
config.available_features.add("perf")
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "ForwardingReferenceOverloadCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include <algorithm>

using namespace clang::ast_matchers;

Expand All @@ -19,14 +18,14 @@ namespace {
// Check if the given type is related to std::enable_if.
AST_MATCHER(QualType, isEnableIf) {
auto CheckTemplate = [](const TemplateSpecializationType *Spec) {
if (!Spec || !Spec->getTemplateName().getAsTemplateDecl()) {
if (!Spec)
return false;
}
const NamedDecl *TypeDecl =
Spec->getTemplateName().getAsTemplateDecl()->getTemplatedDecl();
return TypeDecl->isInStdNamespace() &&
(TypeDecl->getName() == "enable_if" ||
TypeDecl->getName() == "enable_if_t");

const TemplateDecl *TDecl = Spec->getTemplateName().getAsTemplateDecl();

return TDecl && TDecl->isInStdNamespace() &&
(TDecl->getName() == "enable_if" ||
TDecl->getName() == "enable_if_t");
};
const Type *BaseType = Node.getTypePtr();
// Case: pointer or reference to enable_if.
Expand Down
103 changes: 91 additions & 12 deletions clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ AST_MATCHER_P2(Expr, hasSizeOfDescendant, int, Depth,
return false;
}

AST_MATCHER(Expr, offsetOfExpr) { return isa<OffsetOfExpr>(Node); }

CharUnits getSizeOfType(const ASTContext &Ctx, const Type *Ty) {
if (!Ty || Ty->isIncompleteType() || Ty->isDependentType() ||
isa<DependentSizedArrayType>(Ty) || !Ty->isConstantSizeType())
Expand Down Expand Up @@ -221,17 +223,15 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) {
const auto ElemType =
arrayType(hasElementType(recordType().bind("elem-type")));
const auto ElemPtrType = pointerType(pointee(type().bind("elem-ptr-type")));
const auto SizeofDivideExpr = binaryOperator(
hasOperatorName("/"),
hasLHS(
ignoringParenImpCasts(sizeOfExpr(hasArgumentOfType(hasCanonicalType(
type(anyOf(ElemType, ElemPtrType, type())).bind("num-type")))))),
hasRHS(ignoringParenImpCasts(sizeOfExpr(
hasArgumentOfType(hasCanonicalType(type().bind("denom-type")))))));

Finder->addMatcher(
binaryOperator(
hasOperatorName("/"),
hasLHS(ignoringParenImpCasts(sizeOfExpr(hasArgumentOfType(
hasCanonicalType(type(anyOf(ElemType, ElemPtrType, type()))
.bind("num-type")))))),
hasRHS(ignoringParenImpCasts(sizeOfExpr(
hasArgumentOfType(hasCanonicalType(type().bind("denom-type")))))))
.bind("sizeof-divide-expr"),
this);
Finder->addMatcher(SizeofDivideExpr.bind("sizeof-divide-expr"), this);

// Detect expression like: sizeof(...) * sizeof(...)); most likely an error.
Finder->addMatcher(binaryOperator(hasOperatorName("*"),
Expand All @@ -257,8 +257,9 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) {
.bind("sizeof-sizeof-expr"),
this);

// Detect sizeof in pointer arithmetic like: N * sizeof(S) == P1 - P2 or
// (P1 - P2) / sizeof(S) where P1 and P2 are pointers to type S.
// Detect sizeof usage in comparisons involving pointer arithmetics, such as
// N * sizeof(T) == P1 - P2 or (P1 - P2) / sizeof(T), where P1 and P2 are
// pointers to a type T.
const auto PtrDiffExpr = binaryOperator(
hasOperatorName("-"),
hasLHS(hasType(hasUnqualifiedDesugaredType(pointerType(pointee(
Expand All @@ -285,6 +286,47 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) {
hasRHS(ignoringParenImpCasts(SizeOfExpr.bind("sizeof-ptr-div-expr"))))
.bind("sizeof-in-ptr-arithmetic-div"),
this);

// SEI CERT ARR39-C. Do not add or subtract a scaled integer to a pointer.
// Detect sizeof, alignof and offsetof usage in pointer arithmetics where
// they are used to scale the numeric distance, which is scaled again by
// the pointer arithmetic operator. This can result in forming invalid
// offsets.
//
// Examples, where P is a pointer, N is some integer (both compile-time and
// run-time): P + sizeof(T), P + sizeof(*P), P + N * sizeof(*P).
//
// This check does not warn on cases where the pointee type is "1 byte",
// as those cases can often come from generics and also do not constitute a
// problem because the size does not affect the scale used.
const auto InterestingPtrTyForPtrArithmetic =
pointerType(pointee(qualType().bind("pointee-type")));
const auto SizeofLikeScaleExpr =
expr(anyOf(unaryExprOrTypeTraitExpr(ofKind(UETT_SizeOf)),
unaryExprOrTypeTraitExpr(ofKind(UETT_AlignOf)),
offsetOfExpr()))
.bind("sizeof-in-ptr-arithmetic-scale-expr");
const auto PtrArithmeticIntegerScaleExpr = binaryOperator(
hasAnyOperatorName("*", "/"),
// sizeof(...) * sizeof(...) and sizeof(...) / sizeof(...) is handled
// by this check on another path.
hasOperands(expr(hasType(isInteger()), unless(SizeofLikeScaleExpr)),
SizeofLikeScaleExpr));
const auto PtrArithmeticScaledIntegerExpr =
expr(anyOf(SizeofLikeScaleExpr, PtrArithmeticIntegerScaleExpr),
unless(SizeofDivideExpr));

Finder->addMatcher(
expr(anyOf(
binaryOperator(hasAnyOperatorName("+", "-"),
hasOperands(hasType(InterestingPtrTyForPtrArithmetic),
PtrArithmeticScaledIntegerExpr))
.bind("sizeof-in-ptr-arithmetic-plusminus"),
binaryOperator(hasAnyOperatorName("+=", "-="),
hasLHS(hasType(InterestingPtrTyForPtrArithmetic)),
hasRHS(PtrArithmeticScaledIntegerExpr))
.bind("sizeof-in-ptr-arithmetic-plusminus"))),
this);
}

void SizeofExpressionCheck::check(const MatchFinder::MatchResult &Result) {
Expand Down Expand Up @@ -409,6 +451,43 @@ void SizeofExpressionCheck::check(const MatchFinder::MatchResult &Result) {
<< SizeOfExpr->getSourceRange() << E->getOperatorLoc()
<< E->getLHS()->getSourceRange() << E->getRHS()->getSourceRange();
}
} else if (const auto *E = Result.Nodes.getNodeAs<BinaryOperator>(
"sizeof-in-ptr-arithmetic-plusminus")) {
const auto *PointeeTy = Result.Nodes.getNodeAs<QualType>("pointee-type");
const auto *ScaleExpr =
Result.Nodes.getNodeAs<Expr>("sizeof-in-ptr-arithmetic-scale-expr");
const CharUnits PointeeSize = getSizeOfType(Ctx, PointeeTy->getTypePtr());
const int ScaleKind = [ScaleExpr]() {
if (const auto *UTTE = dyn_cast<UnaryExprOrTypeTraitExpr>(ScaleExpr))
switch (UTTE->getKind()) {
case UETT_SizeOf:
return 0;
case UETT_AlignOf:
return 1;
default:
return -1;
}

if (isa<OffsetOfExpr>(ScaleExpr))
return 2;

return -1;
}();

if (ScaleKind != -1 && PointeeSize > CharUnits::One()) {
diag(E->getExprLoc(),
"suspicious usage of '%select{sizeof|alignof|offsetof}0(...)' in "
"pointer arithmetic; this scaled value will be scaled again by the "
"'%1' operator")
<< ScaleKind << E->getOpcodeStr() << ScaleExpr->getSourceRange();
diag(E->getExprLoc(),
"'%0' in pointer arithmetic internally scales with 'sizeof(%1)' == "
"%2",
DiagnosticIDs::Note)
<< E->getOpcodeStr()
<< PointeeTy->getAsString(Ctx.getPrintingPolicy())
<< PointeeSize.getQuantity();
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace clang::tidy::bugprone {

/// Find suspicious usages of sizeof expression.
/// Find suspicious usages of sizeof expressions.
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/bugprone/sizeof-expression.html
Expand Down
10 changes: 10 additions & 0 deletions clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "../bugprone/ReservedIdentifierCheck.h"
#include "../bugprone/SignalHandlerCheck.h"
#include "../bugprone/SignedCharMisuseCheck.h"
#include "../bugprone/SizeofExpressionCheck.h"
#include "../bugprone/SpuriouslyWakeUpFunctionsCheck.h"
#include "../bugprone/SuspiciousMemoryComparisonCheck.h"
#include "../bugprone/UnhandledSelfAssignmentCheck.h"
Expand Down Expand Up @@ -281,6 +282,9 @@ class CERTModule : public ClangTidyModule {
"cert-oop58-cpp");

// C checkers
// ARR
CheckFactories.registerCheck<bugprone::SizeofExpressionCheck>(
"cert-arr39-c");
// CON
CheckFactories.registerCheck<bugprone::SpuriouslyWakeUpFunctionsCheck>(
"cert-con36-c");
Expand Down Expand Up @@ -332,6 +336,12 @@ class CERTModule : public ClangTidyModule {
ClangTidyOptions getModuleOptions() override {
ClangTidyOptions Options;
ClangTidyOptions::OptionMap &Opts = Options.CheckOptions;
Opts["cert-arr39-c.WarnOnSizeOfConstant"] = "false";
Opts["cert-arr39-c.WarnOnSizeOfIntegerExpression"] = "false";
Opts["cert-arr39-c.WarnOnSizeOfThis"] = "false";
Opts["cert-arr39-c.WarnOnSizeOfCompareToConstant"] = "false";
Opts["cert-arr39-c.WarnOnSizeOfPointer"] = "false";
Opts["cert-arr39-c.WarnOnSizeOfPointerToAggregate"] = "false";
Opts["cert-dcl16-c.NewSuffixes"] = "L;LL;LU;LLU";
Opts["cert-err33-c.CheckedFunctions"] = CertErr33CCheckedFunctions;
Opts["cert-err33-c.AllowCastToVoid"] = "true";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void DefinitionsInHeadersCheck::check(const MatchFinder::MatchResult &Result) {
// inline is not allowed for main function.
if (FD->isMain())
return;
diag(FD->getLocation(), /*Description=*/"make as 'inline'",
diag(FD->getLocation(), "mark the definition as 'inline'",
DiagnosticIDs::Note)
<< FixItHint::CreateInsertion(FD->getInnerLocStart(), "inline ");
} else if (const auto *VD = dyn_cast<VarDecl>(ND)) {
Expand Down
27 changes: 23 additions & 4 deletions clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "AvoidCArraysCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"

using namespace clang::ast_matchers;

Expand Down Expand Up @@ -60,6 +61,7 @@ void AvoidCArraysCheck::registerMatchers(MatchFinder *Finder) {

Finder->addMatcher(
typeLoc(hasValidBeginLoc(), hasType(arrayType()),
optionally(hasParent(parmVarDecl().bind("param_decl"))),
unless(anyOf(hasParent(parmVarDecl(isArgvOfMain())),
hasParent(varDecl(isExternC())),
hasParent(fieldDecl(
Expand All @@ -72,11 +74,28 @@ void AvoidCArraysCheck::registerMatchers(MatchFinder *Finder) {

void AvoidCArraysCheck::check(const MatchFinder::MatchResult &Result) {
const auto *ArrayType = Result.Nodes.getNodeAs<TypeLoc>("typeloc");

const bool IsInParam =
Result.Nodes.getNodeAs<ParmVarDecl>("param_decl") != nullptr;
const bool IsVLA = ArrayType->getTypePtr()->isVariableArrayType();
enum class RecommendType { Array, Vector, Span };
llvm::SmallVector<const char *> RecommendTypes{};
if (IsVLA) {
RecommendTypes.push_back("std::vector<>");
} else if (ArrayType->getTypePtr()->isIncompleteArrayType() && IsInParam) {
// in function parameter, we also don't know the size of
// IncompleteArrayType.
if (Result.Context->getLangOpts().CPlusPlus20)
RecommendTypes.push_back("std::span<>");
else {
RecommendTypes.push_back("std::array<>");
RecommendTypes.push_back("std::vector<>");
}
} else {
RecommendTypes.push_back("std::array<>");
}
diag(ArrayType->getBeginLoc(),
"do not declare %select{C-style|C VLA}0 arrays, use "
"%select{std::array<>|std::vector<>}0 instead")
<< ArrayType->getTypePtr()->isVariableArrayType();
"do not declare %select{C-style|C VLA}0 arrays, use %1 instead")
<< IsVLA << llvm::join(RecommendTypes, " or ");
}

} // namespace clang::tidy::modernize
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ static FindArgsResult findArgs(const CallExpr *Call) {
return Result;
}

static SmallVector<FixItHint>
// Returns `true` as `first` only if a nested call to `std::min` or
// `std::max` was found. Checking if `FixItHint`s were generated is not enough,
// as the explicit casts that the check introduces may be generated without a
// nested `std::min` or `std::max` call.
static std::pair<bool, SmallVector<FixItHint>>
generateReplacements(const MatchFinder::MatchResult &Match,
const CallExpr *TopCall, const FindArgsResult &Result,
const bool IgnoreNonTrivialTypes,
Expand All @@ -91,13 +95,15 @@ generateReplacements(const MatchFinder::MatchResult &Match,
const bool IsResultTypeTrivial = ResultType.isTrivialType(*Match.Context);

if ((!IsResultTypeTrivial && IgnoreNonTrivialTypes))
return FixItHints;
return {false, FixItHints};

if (IsResultTypeTrivial &&
static_cast<std::uint64_t>(
Match.Context->getTypeSizeInChars(ResultType).getQuantity()) >
IgnoreTrivialTypesOfSizeAbove)
return FixItHints;
return {false, FixItHints};

bool FoundNestedCall = false;

for (const Expr *Arg : Result.Args) {
const auto *InnerCall = dyn_cast<CallExpr>(Arg->IgnoreParenImpCasts());
Expand Down Expand Up @@ -146,6 +152,9 @@ generateReplacements(const MatchFinder::MatchResult &Match,
*Match.Context))
continue;

// We have found a nested call
FoundNestedCall = true;

// remove the function call
FixItHints.push_back(
FixItHint::CreateRemoval(InnerCall->getCallee()->getSourceRange()));
Expand All @@ -168,7 +177,7 @@ generateReplacements(const MatchFinder::MatchResult &Match,
CharSourceRange::getTokenRange(InnerResult.First->getEndLoc())));
}

const SmallVector<FixItHint> InnerReplacements = generateReplacements(
const auto [_, InnerReplacements] = generateReplacements(
Match, InnerCall, InnerResult, IgnoreNonTrivialTypes,
IgnoreTrivialTypesOfSizeAbove);

Expand All @@ -189,7 +198,7 @@ generateReplacements(const MatchFinder::MatchResult &Match,
}
}

return FixItHints;
return {FoundNestedCall, FixItHints};
}

MinMaxUseInitializerListCheck::MinMaxUseInitializerListCheck(
Expand Down Expand Up @@ -238,11 +247,11 @@ void MinMaxUseInitializerListCheck::check(
const auto *TopCall = Match.Nodes.getNodeAs<CallExpr>("topCall");

const FindArgsResult Result = findArgs(TopCall);
const SmallVector<FixItHint> Replacements =
const auto [FoundNestedCall, Replacements] =
generateReplacements(Match, TopCall, Result, IgnoreNonTrivialTypes,
IgnoreTrivialTypesOfSizeAbove);

if (Replacements.empty())
if (!FoundNestedCall)
return;

const DiagnosticBuilder Diagnostic =
Expand Down
Loading
Loading