[clang] Add support for consteval null terminated strings
Adds support for null terminated strings produced by constexpr
evaluation. This makes it possible to perform analysis of format
strings that previously were not possible, and is needed in the
future to support __ptrauth qualifier options.
[FindGRPC.cmake] Make sure that `PACKAGE_VERSION` is not overwritten when doing `find_package(gRPC)` (#173115)
`PACKAGE_VERSION` is important since it sets the `LLVM_VERSION_STRING`
string.
[clang] Add support for consteval null terminated strings
Adds support for null terminated strings produced by constexpr
evaluation. This makes it possible to perform analysis of format
strings that previously were not possible, and is needed in the
future to support __ptrauth qualifier options.
[CIR] Add 'get element' for array index ops (#172897)
This is a refactor/upstream/etc of:
https://github.com/llvm/clangir/pull/1748
This modifies our array-index operations to use a specific operation
(GetElementOp). According to the original patch commit message, this
replaces nearly 50% of ptr_stride operations in single source tests!
[RISCV] Fix Zvfbfa tests from #171794 to mitigate UTC bug. NFCI (#173125)
Context:
https://github.com/llvm/llvm-project/pull/171794#discussion_r2614489484
For some reasons, UTC is unable to merge the 'ZVFHMIN' and 'ZVFBFA'
CHECK lines in some of the test functions, and emits incorrect CHECK
lines for them, once you run UTC again on the file.
This hinders the ability to update these tests in bulk, as one has to
manually remove the excessed ZVFBFA lines. While I don't know how to fix
UTC at this moment, I found a workaround that simply re-orders these two
check prefixes.
This is effectively a NFC
[clang][modules] print mtime of input files when recorded in "module-file-info" (#173120)
When debugging issues related to invalidation for implicit module
compilations, it can be helpful to consult the PCM to see what the saved
mtime was.
[clang][ssaf] Add EntityId and EntityIdTable for efficient entity handling (#171660)
Introduce EntityId and EntityIdTable to provide efficient, lightweight
handles
for working with EntityNames in the Scalable Static Analysis Framework
(SSAF).
Introduces two key components:
- EntityId: Lightweight opaque handle representing an entity in an
EntityIdTable
- EntityIdTable: Entity name interning table that maps unique
EntityNames to EntityIds
The interning table ensures each EntityName maps to exactly one
EntityId,
providing fast equality comparisons and lookups. EntityIds are
index-based
and remain stable for the lifetime of their table. This enables
efficient
[5 lines not shown]
Fix use-after-free bug in mergeTwoFunctions().
This was caught by Apple's Probabilistic Guard Malloc which detected
that OldF's memory is freed inside mergeTwoFunctions(), and then
back in insert() the now dangling pointer is dereferenced again.
rdar://163874208
[clang][test] Disable avx512cd-builtins.c test on 32-bit Arm
When clang is compiled with a more recent clang
(that includes 5d7f324614d7a5c0de89cfe8295a9b2b7ef5d073),
the code produced enforces 64-bit alignment on a type
that is used during this test.
For reasons not known yet, that type is not 64-bit aligned
though you would normally expect it to be.
See https://github.com/llvm/llvm-project/issues/172994.
I would xfail this but I'm not 100% sure that it always fails.
Memory layout may make it pass sometimes.
[lldb] Recognize MTE faults with EXC_GUARD exception type (#172579)
Recognize the new `EXC_GUARD` mach exception type
for MTE faults. We also keep supporting the old
`EXC_BAD_ACCESS` exception type for backward
compatibility (newer LLDB on older OS).
rdar://166415268
[AArch64] Fix wrong AArch64Subtarget construction. (#172942)
The AArch64Subtarget construction was wrong for two reasons: firstly,
createMCSubtargetInfo() does not create an AArch64Subtarget object, and
secondly, the target CPU and features were left blank. This has been
benign so far since no methods were called that depended on this, but it
is undefined for the first reason, and creating the subtarget info in a
state that the user did not request for the second reason. This commit
fixes both issues.
[clang-tidy][NFC][Docs] Fix typo in bugprone-macro-parentheses (#173101)
Link title for `CERT C Coding Standard rule PRE20-C` should be `PRE02-C`
to match target.
[flang] Correctly buffer warnings in Semantics/check-call.cpp (#172738)
There are calls to semantics::SemanticsContext::Warn() in check-call.cpp
that are not properly directing their output to the local message
buffer, so they can appear unconditionally in the output of the
compiler. This is a problem for generic interface resolution, which
checks procedure actual arguments against specific procedures using this
code, buffering the messages that might appear, and discarding the
messages for failed matches. Worse, the bogus warnings that escape the
buffering can be associated with completely unrelated locations.
Fix by passing the local message buffer to these Warn() calls.
(I couldn't come up with a good reduced test case, and am not sure that
the original code can be copied for use as one.)