Files
Alex Duran 3f74bb2cae [Offload][Omp][NFC] Implement static analysis tool suggestions (#243390)
These are a set of small changes suggested by a static code analysis
tool to improve code quality.

A summary of the changes and reason is here (AI-generated):

- Unchecked return value: (void) on synchronize() in AsyncInfo.cpp and
on addPassesToEmitFile in JIT.cpp.
- Resource leak: targetDataEnd in omptarget.cpp uses make_unique plus
release() (ownership passes to the post-processing callback, which
deletes it).
- Uninitialized variable: HDTT = nullptr in Mapping.h and Rc =
OFFLOAD_SUCCESS in API.cpp.
- Integer overflow: static_cast<uint64_t>(1) << in
getPartialStructRequiredAlignment.
- Tautological assert: removed the unsigned >= 0 assert in Mapping.h.
After that, becomes an unused variable. Remove it.
  - Rule of three: deleted copy/assign operators in:
    - ExclusiveAccess.h
    - OMPT/Interface.h (two classes)
    - omptarget.h
    - MemoryManager.h
    - RPC.h
    - OffloadImpl.cpp
    - host/rtl.cpp
- Copy instead of move: std::move in EnvironmentVar.h,
PluginInterface.cpp and JIT.cpp.
- Underflow/overflow asserts: added in ErrorReporting.h and
libompaccsupport/device.cpp.

Assisted by Claude.
2026-11-17 12:18:19 +01:00
..