[clang] Fix assertion failures involving code completion with delayed default arguments and exception specifications (#203794)
Fixes #200879.
This patch fixes crashes when code completion is invoked immediately
after the declaration of a top-level class containing methods with
default arguments or exception specifications.
Default-argument case: https://godbolt.org/z/4G9nTfnGd
Exception-specification case: https://godbolt.org/z/8frEv8von
When code completion is triggered right after the class body, the
lookahead token is `tok::code_completion` when late parsing begins. The
token is saved to the cached token stream and `ConsumeAnyToken()` is
called to consume it, but `ConsumeAnyToken()` defaults to rejecting
completion tokens, which cuts off parsing. In the default-arguments path
(as reported in #200879), the assertion `Tok.is(tok::equal) && "Default
argument not starting with '='"` is triggered because `cutOffParsing()`
sets the current token to `eof`.
[2 lines not shown]
games/dethrace: New port: Reverse engineering the 1997 game "Carmageddon"
Dethrace is an attempt to learn how the 1997 driving/mayhem game Carmageddon
works behind the scenes and rebuild it to run natively on modern systems.
WWW: https://github.com/dethrace-labs/dethrace
[M68k][MC] Generate some encoding tests for MOVE (#194269)
# Problem statement
Instruction encoding needs to be solid, as it's one of the foundations
that a target backend is built upon.
It's error-prone work, and tedious to write tests for.
Test coverage for M68k instruction encoding isn't exhaustive, and we've
had bugs in the past where instructions have not been encoded correctly.
# Proposed solution
Using the documentation at https://m680x0.github.io/doc/official-docs it
should be possible to write some scripts to generate encoding tests for
all the instructions.
# Description of this PR
[24 lines not shown]
[analyzer] Implement UseAfterLifetimeEnd checker (#205521)
Implemented the UseAfterLifetimEnd checker which is responsible for detecting lifetime safety violations involving the [[clang::lifetimebound]] annotation. This checker can catch violations in annotated code such as dangling pointer/reference bound to local variables that go out of scope. This checker is one of the reporting checkers that depend on the LifetimeModeling checker #205951. To detect dangling sources the checker queries the state at function exit points through the checkEndFunction callback. This checker does not handle lifetime issues where the code is unannotated.
Detailed work history of this checker can be found here: #200145
Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
locale: make install Unicode 17.0.0/CLDR 48.2
Data changes:
48.1:
- Update RSD (Serbian Dinar) to use 2-digits for non-cash and 0-digits
for cash.
- Fix issue with tippi and bindi in Punjabi exemplars.
- Fix parsing issue in numeric date+time patterns for zh_Hant and yue.
- Fix issues with hour cycle display names for several languages.
https://cldr.unicode.org/downloads/cldr-48#481-changes
48.2:
- Group separator for number formatting was updated to ' in fr-CH
consistent with other Swiss locales.
- Some fixes to date formats including: Hv available formats were
updated to match behavior in CLDR 47 due to web compatibility issues
related to current JS capabilities.
[9 lines not shown]
locale: Update Unicode to CLDR 48.2
Notable changes:
- Group separator for number formatting was updated to ' in fr-CH
consistent with other Swiss locales.
- Some fixes to date formats including: Hv available formats were
updated to match behavior in CLDR 47 due to web compatibility issues
related to current JS capabilities.
- Emoji annotations fixes including collisions between emoji short
names.
- Updated AM/PM for ko & ps to be consistent with how the wide forms are
localized.
Reviewed by: bapt
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D57626
locale: Do not strip the suffix from CLDRVERSION
The upstream CLDR directory structure requires the full version string.
Remove the ':R' modifier to fix the fetch paths.
Previously this worked because major releases were published in a
directory without the ".0" suffix, while the filenames included it.
Starting with CLDR 47, the upstream layout changed to use the full
version string exclusively, causing the fetch URLs to break for point
releases.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D57625
[clang][Driver] Include stdc-predef.h by default on musl
Match GCC behavior for musl-based Linux targets by implicitly passing
`-include stdc-predef.h` for non-freestanding compilations.
Unlike glibc, musl does not arrange for this header to be included through
its normal system headers. As a result, Clang may miss predefined C macros
provided by musl's stdc-predef.h unless users include it manually, while the
same code works with GCC.
Add Driver tests covering musl, non-musl, freestanding, preprocessed input,
missing-header diagnostics, and actual macro visibility.
This patch is based on: https://reviews.llvm.org/D137043 and
slightly tweaks it, as the code has drifted since 2023 when
that was authored.
Co-authored-by: Tao Liang <Origami404 at foxmail.com>
Co-authored-by: YingChi Long <me at inclyc.cn>
Be truly pedantic about UTF-8 encodings
If we're not going to be accepting "legacy" UTF-8
(5 and 6 byte encodings for code points >= 0x00200000 which the
standards don't allow, as they won't fit in UTF-16) then we
certainly should never be able to generate them, and even more
should certainly be pedantic about not allowing the various
forms of mis-coded strings for which there is no justification
but have been known to be used to attempt to violate security.
This, I believe, now enforces all the current restrictions, eg,
it will no longer be possible to encode ascii in 2 bytes (0xc0 '.')
and similar, the shortest legal encoding is all that will be
accepted (and all that will be generated, but that was always true).
It is quite possible that this will break things, probably many
tests, as now random garbage won't be accepted as valid, things
must be properly encodedd.
ocaml-zarith: update to 1.14
Release 1.14 (2024-07-10)
- #148, #149: Fail unmarshaling when it would produce non-canonical big ints
- #145, #150: Use standard hash function for `Z.hash` and add `Z.seeded_hash`
- #140, #147: Add fast path for `Z.divisible` on small arguments
Release 1.13 (2023-07-19)
- #113: add conversions to/from small unsigned integers `(to|fits)_(int32|int64|nativeint)_unsigned` [Antoine Miné]
- #128: add functions to pseudo-randomly generate integers [Xavier Leroy]
- #105: add `Big_int.big_int_of_float` [Yishuai Li]
- #90: add fast path to `Z.extract` when extraction leads to a small integer [Frédéric Recoules]
- #137: more precise bounds for of_float conversion to small ints [Antoine Miné]
- #118: fix Z_mlgmpidl interface for mlgmpidl >= 1.2 [Simmo Saan]
- #109: fix typo in `ml_z_mul` function [Bernhard Schommer]
- #108: fix dependency on C evaluation order in `ml_z_remove` [Xavier Clerc]
- #117 #120 #129 #132 #135 #139 #141: configure & build simplifications and fixes [various authors]
- #134: CI testing: add Windows, test both 4.14 and 5.0 [Hugo Heuzard]
devel/ocaml-mew: New port
Mew - Modal Editing Witch - is an general modal editing engine
generator. Users must provide an implementation for Key, Mode,
Concurrent modules to the functor.
WWW: https://github.com/kandu/mew
devel/ocaml-mew_vi: New port
Mew_vi - Modal Editing Witch, VI interpreter - is an VI-like modal
editing engine generator. Users must provide an implementation for
Key, Mode, Concurrent modules to the functor.
WWW: https://github.com/kandu/mew_vi
devel/ocaml-trie: New port
This OCaml library implements a trie tree in OCaml. A trie is a
datastructure used to implement a prefix search efficiently.
WWW: https://github.com/kandu/trie