[clang-tidy] Add frames for bugprone-exception-escape options (#187971)
This patch adds frames emitting for
`bugprone-exception-escape.TreatFunctionsWithoutSpecificationAsThrowing`.
As of AI Usage: Gemini 3 is used for pre-commit reviewing.
Closes https://github.com/llvm/llvm-project/issues/184781
[libc] Allow RPC interface to be compiled with MSVC (#190483)
Summary:
This should be portable to other compilers so it can support Windows
infrastructure.
I don't really use MSVC but godbolt seems happy:
https://godbolt.org/z/Ysdx1Y1rq
[CIR] Use data size in emitAggregateCopy for overlapping copies
Add skip_tail_padding property to cir.copy to handle potentially-overlapping
subobject copies directly, instead of falling back to cir.libc.memcpy. When
set, the lowering uses the record's data size (excluding tail padding) for
the memcpy length. This keeps typed semantics and promotability of cir.copy.
Also fix CXXABILowering to preserve op properties when recreating operations,
and expose RecordType::computeStructDataSize() for computing data size of
padded record types.
[LV][NFC] remove dead code in canFoldTailByMasking() (#190263)
Remove unused ReductionLiveOuts variable in `canFoldTailByMasking()`.
The set was being populated with reduction loop exit instructions but
was never actually used anywhere in the function.
[CIR] Use data size in emitAggregateCopy for overlapping copies
Add skip_tail_padding property to cir.copy to handle potentially-overlapping
subobject copies directly, instead of falling back to cir.libc.memcpy. When
set, the lowering uses the record's data size (excluding tail padding) for
the memcpy length. This keeps typed semantics and promotability of cir.copy.
Also fix CXXABILowering to preserve op properties when recreating operations,
and expose RecordType::computeStructDataSize() for computing data size of
padded record types.
[CIR] Use data size in emitAggregateCopy for overlapping copies
Add skip_tail_padding property to cir.copy to handle potentially-overlapping
subobject copies directly, instead of falling back to cir.libc.memcpy. When
set, the lowering uses the record's data size (excluding tail padding) for
the memcpy length. This keeps typed semantics and promotability of cir.copy.
Also fix CXXABILowering to preserve op properties when recreating operations,
and expose RecordType::computeStructDataSize() for computing data size of
padded record types.
[clang-tidy] Improve bugprone.use-after-move interaction with explicit destructor call. (#188866)
It is valid (although niche) to call an explicit destructor after moving
the object.
[lldb] Replace ResolveValue() with GetScalar() in DWARFExpression (NFCI) (#185841)
Value::ResolveValue() only does something if the value has an associated
compiler type, which is never set on values used in DWARF expressions.
Simplify code by inlining the method.
clang: Make --cuda-gpu-arch translation test comprehensive for AMDGPU
Split the PTX and AMDGPU handling into separate files and test all of
the amdgpu targets.
[CIR] Convert global_visibility from attribute to property (#190488)
Replace CIR_VisibilityAttr with
DefaultValuedProp<EnumProp<CIR_VisibilityKind>>
for global_visibility on GlobalOp and FuncOp. This removes the need for
custom
parse/print functions and simplifies callers to use direct enum values
instead
of wrapping/unwrapping VisibilityAttr.
[mlir][reducer] Add opt-pass-file option to opt-reduction pass (#189353)
Currently, the opt-reduction-pass only supports inputting the
optimization pipeline via the command line, which becomes cumbersome
when the pipeline is long. To address this, this PR introduces the
opt-pass-file option. This allows users to save the pipeline in a file
and provide the filename to parse the pipeline.
[clang][AST][NFC] Add default value to `Expr::isConstantInitializer()` parameter (#190313)
Almost every caller passes `false` for `ForRef`, or rather, doesn't care
what the value is. Use a default value instead.
[clang] implement CWG2064: ignore value dependence for decltype
The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.
Readds a few test cases from da98651
Fixes #61818
[clang] implement CWG2064: ignore value dependence for decltype
The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.
Readds a few test cases from da98651
Fixes #61818
[Clang] Fix concept cache for normalized fold expressions (#190312)
When both outer and inner pack substitution indexes are present, we
should cache both. Otherwise we will have wrong cached result.
This is a regression fix so no release note.
Fixes https://github.com/llvm/llvm-project/issues/190169
[clang] implement CWG2064: ignore value dependence for decltype
The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.
Readds a few test cases from da98651
Fixes #61818
[clang] diagnose block pointer types as invalid for constant template parameters (#190464)
Fixes a crash by making it ill-formed to have a constant template
parameter with a block pointer type.
Fixes #189247
[clang] ignore value dependence for decltype
The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.
Fixes #61818
[clang] NFC: Add test case for #178324 and mark it as fixed (#190490)
Issue #178324 was actually fixed by #187755
We lost the "declaration does not declare anything" warning since the
regression was introduced, but that was because:
1) Since #78436 we treat __builtin_FUNCSIG in a dependent context
effectivelly as if it contained a template parameter.
2) Our decltype implementation treats eexpressions containing template
parameters as if they were completely opaque (but alas this goes against
the spec, which says in [temp.type]p4 this should be looking only at
type dependence).
3) Since the decltype is opaque, we don't know what lookup will find, so
we can't issue the warning because we don't know if we are going to end
up with a type or an expression.
Fixes #178324
[lldb] Inherit Host::GetEnvironment() when launching a wasm runtime (#190476)
Some WebAssembly runtimes might use environment variables such as `HOME`
or `XDG_CONFIG_HOME` to store configuration files, additionally some VMs
might allow wasm modules to read environment variables from the host.
Currently, if a runtime is launched using the WebAssembly platform it
doesn't inherit the environment. As a result wasm runtimes and modules
are unable to read from environment variables and might even fail to
launch (if the config file is required). This PR aims to resolve this
issue, I have tested this with the WARDuino runtime and my WIP gdbstub.