[clang-format] Ignore imports in comments for Java import sorting (#177326)
Java source files can contain apparent import statements inside block
comments (e.g., showing a code example). These can get mixed up with
real import statements when run through clang-format.
This patch tracks block comments (/* ... */) so that we skip lines that
are inside them.
Fixes #176771
---------
Co-authored-by: Natalia Kokoromyti <knatalia at yost-cm-01-imme.stanford.edu>
Co-authored-by: owenca <owenpiano at gmail.com>
[clang-format] Fix incorrect trailing comment and escaped newlines when AlignArrayOfStructures is enabled (#180305)
This change fixes how the spaces are modified during alignment.
Previously it was inconsistent whether the `StartOfTokenColumn` and
`PreviousEndOfTokenColumn` members of `WhitespaceManager::Change`s were
also updated when their `Spaces` member was changed to align tokens.
A new function has been added that properly maintains the relationship
between these members, and all places that directly modified `Spaces`
have been replaced with calls to this new function.
Fixes https://github.com/llvm/llvm-project/issues/138151. Fixes
https://github.com/llvm/llvm-project/issues/85937. Fixes
https://github.com/llvm/llvm-project/issues/53442. Tests have been added
to ensure they stay fixed.
Attribution Note - I have been authorized to contribute this change on
behalf of my company: ArenaNet LLC
[Driver] Enable -ftime-trace for CUDA/HIP device compilation (#179701)
Previously, -ftime-trace only generated trace files for host compilation
when compiling CUDA/HIP code. Device compilation was excluded because
the OffloadingPrefix was non-empty, causing handleTimeTrace() to be
skipped.
This patch enables -ftime-trace for offload device compilation by:
1. Passing the offloading prefix to handleTimeTrace()
2. Including the bound architecture in the trace filename
3. Deriving the trace output directory from the -o option for device
compilation (since the device output is a temp file)
Trace files are now generated for each offload target:
- Host: output.json
- Device: output-hip-amdgcn-amd-amdhsa-gfx906.json
Note: When using --save-temps, multiple compilation phases (preprocess,
compile, codegen) write to the same trace file, with each phase
[3 lines not shown]
[CUDA/HIP][SYCL] Deduplicate deferred diagnostics across multiple callers (#185926)
[CUDA/HIP][SYCL] Deduplicate deferred diagnostics across multiple
callers
Deferred diagnostics for a function were emitted once per caller that
forced the function into device context. When multiple device functions
called the same host-device function containing errors, the diagnostics
were repeated for each caller, producing noisy duplicate output.
Change the deferred diagnostic emission to a two-pass approach:
1. During the call graph walk, collect callers in DeviceKnownEmittedFns
(now storing multiple callers per function) and mark functions that
need diagnostics, but don't emit yet.
2. After the walk completes, emit diagnostics once per function with
all callers listed as notes.
Call chain notes now use "called by" for the first caller in each chain
and "which is called by" for subsequent callers in the chain, making it
[5 lines not shown]
[lldb] Nominate myself for FreeBSD maintainer (#180053)
I've been FreeBSD src contributor since 2022 and started working for the
FreeBSD Foundation starting from January. I created and have been
actively working on #180061 to achieve [LLDB improvement on
FreeBSD](https://wiki.freebsd.org/SummerOfCodeIdeas#Improve_LLDB_on_FreeBSD)
which was originally Google Summer of Code idea.
The initial LLDB support for userspace and kernel debugging on FreeBSD
was initiated by Moritz system back in 2020, but there are some missing
bits like architecture support due to lack of time. Due to this, FreeBSD
developers still depend on GDB-derived kernel debugger and it still
remains de-facto tier 1 debugger (e.g. no scripts in source tree for
lldb).
To track what/how I'm working on this task, please take a look at my
foundation [status report on LLDB
improvement](https://github.com/FreeBSDFoundation/status-updates/blob/main/Minsoo_Choo/kdb.md).
As you see, I will also improve Lua scripting on LLDB as Lua remains
[13 lines not shown]
[flang][cuda][openacc] Fix interoperability when host_data is not generated (#186516)
Update lowering to not process operands if the operation will not be
generated because of a `if(.false.)` clause. This was breaking when
enabling CUDA Fortran on the same test.
[NFC][sanitizer] Accept ETIMEDOUT in getpwnam_r_invalid_user.cpp (#186538)
On some systems, looking up an result in a timeout.
Error here is not a sign of compiler-rt issue.
Fixes flakiness on
https://lab.llvm.org/buildbot/#/builders/sanitizer-ppc64le-linux
[RISCV] Add codegen patterns to support short forward branches with immediates (#185643)
This is a follow-up to #182456. This PR adds support for short forward
branches where branches are from Qualcomm uC `Xqcibi` extension.
[libclc][NFC] Rename three .inc files to avoid name conflicts (#186384)
Follow-up of 9b96ebc. There are binary_def.inc and unary_def.inc in
header directory.
- clc_ep.inc -> clc_ep_decl.inc
- relational/binary_def.inc -> relational/relational_binary_def.inc
- relational/unary_def.inc -> relational/relational_unary_def.inc
[NFC][Support] Don't test UB in Caching.WriteAfterCommit (#186532)
The test expects crash after commit essentially null-dereferencing.
Just check that it's nullptr directly.
Fixes asan/ubsan buildbot.
[clang][DirectX] Specify element-aligned vectors in TargetInfo (#185954)
Add a bit to TargetInfo to specify that vectors are element-aligned
rather than naturally aligned. This is needed to match DirectX's Data
Layout in LLVM.
Note that this removes the `Opts.HLSL` early exit from
`checkDataLayoutConsistency` so that we actually get these checks when
compiling HLSL. This check looks like it was put there because of
similarity between OpenCL and HLSL, but it isn't actually necessary.
Resolves #123968
[libc] Reference the proper namespaced variables in the GPU header
Summary:
These linked to the extern "C" versions which did not exist in test
builds.