<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libcxxabi/test/test_demangle.pass.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[libc++] Add availability markup for LLVM 19 and LLVM 20 (#140072)</title>
<updated>2025-11-03T01:24:30+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2025-11-03T01:24:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3252e11da3ac990732d02d1a881b6544d81fe955'/>
<id>3252e11da3ac990732d02d1a881b6544d81fe955</id>
<content type='text'>
An LLVM 19-aligned libc++ was released with macOS 15.4 (and corresponding OSes),
and LLVM-20 aligned with macOS 26.0. This patch adds availability markup to
reflect that.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An LLVM 19-aligned libc++ was released with macOS 15.4 (and corresponding OSes),
and LLVM-20 aligned with macOS 26.0. This patch adds availability markup to
reflect that.</pre>
</div>
</content>
</entry>
<entry>
<title>[ItaniumDemangle][test] Factor demangler test-cases into file and sync into LLVM (#137947)</title>
<updated>2025-05-30T18:56:50+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2025-05-30T18:56:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f7e172da4caeab9d92f6e97501b1a2c561e616c1'/>
<id>f7e172da4caeab9d92f6e97501b1a2c561e616c1</id>
<content type='text'>
This patch turns the `libcxxabi/test/test_demangle.pass.cpp` into gtest
unit-tests in `llvm/unittests/Demangle`. The main motivation for this is
https://github.com/llvm/llvm-project/pull/137793, where we want to
re-use the test-cases from the ItaniumDemangler to test our OutputBuffer
implementation.

`libcxxabi/test/test_demangle.pass.cpp` now only tests the
`__cxa_demangle` API surface, not the underlying ItaniumDemangle
implementation.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch turns the `libcxxabi/test/test_demangle.pass.cpp` into gtest
unit-tests in `llvm/unittests/Demangle`. The main motivation for this is
https://github.com/llvm/llvm-project/pull/137793, where we want to
re-use the test-cases from the ItaniumDemangler to test our OutputBuffer
implementation.

`libcxxabi/test/test_demangle.pass.cpp` now only tests the
`__cxa_demangle` API surface, not the underlying ItaniumDemangle
implementation.</pre>
</div>
</content>
</entry>
<entry>
<title>[ItaniumDemangle] Add Named flag to "pm" operator (#136862)</title>
<updated>2025-05-12T19:56:07+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2025-05-12T19:56:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=028f70d2524be56bb5d191ec3d7022b40bc4859b'/>
<id>028f70d2524be56bb5d191ec3d7022b40bc4859b</id>
<content type='text'>
Compilers can generate mangled names such as `_ZN1CpmEi` which we
currently fail to demangle. The OperatorInfo table only marked the `pt`
operator as being "named", which prevented the others from demangling
properly. Removing this logic for the other kinds of member operators
isn't causing any tests to fail.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compilers can generate mangled names such as `_ZN1CpmEi` which we
currently fail to demangle. The OperatorInfo table only marked the `pt`
operator as being "named", which prevented the others from demangling
properly. Removing this logic for the other kinds of member operators
isn't causing any tests to fail.</pre>
</div>
</content>
</entry>
<entry>
<title>[ItaniumDemangle][test] Add test-cases for ref-qualified member pointer parameters</title>
<updated>2025-04-23T14:42:56+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2025-04-23T14:40:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=46f18b7c6febe75b2cc0095f2227d935c14f70f2'/>
<id>46f18b7c6febe75b2cc0095f2227d935c14f70f2</id>
<content type='text'>
I noticed that there are test-cases that are commented out. But the
manglings for them seem to be impossible to generate from valid C++. I
added two test-cases generated from following C++ program:
```
struct X {
    int func() const &amp;&amp; { return 5; }
    const int &amp;&amp;func2() { return 5; }
    const int &amp;&amp;func3(const int &amp;x) volatile { return 5; }
};

void f(int (X::*)() const &amp;&amp;, int const &amp;&amp; (X::*)(),
       int const &amp;&amp; (X::*)(const int &amp;) volatile) {}

int main() {
    f(&amp;X::func, &amp;X::func2, &amp;X::func3);
    return 0;
}
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I noticed that there are test-cases that are commented out. But the
manglings for them seem to be impossible to generate from valid C++. I
added two test-cases generated from following C++ program:
```
struct X {
    int func() const &amp;&amp; { return 5; }
    const int &amp;&amp;func2() { return 5; }
    const int &amp;&amp;func3(const int &amp;x) volatile { return 5; }
};

void f(int (X::*)() const &amp;&amp;, int const &amp;&amp; (X::*)(),
       int const &amp;&amp; (X::*)(const int &amp;) volatile) {}

int main() {
    f(&amp;X::func, &amp;X::func2, &amp;X::func3);
    return 0;
}
```
</pre>
</div>
</content>
</entry>
<entry>
<title>[PAC] Add support for __ptrauth type qualifier (#100830)</title>
<updated>2025-04-15T19:54:25+00:00</updated>
<author>
<name>Akira Hatanaka</name>
<email>ahatanak@gmail.com</email>
</author>
<published>2025-04-15T19:54:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a3283a92aea147e89d9d404fa7c8500223c7c22a'/>
<id>a3283a92aea147e89d9d404fa7c8500223c7c22a</id>
<content type='text'>
The qualifier allows programmer to directly control how pointers are
signed when they are stored in a particular variable.

The qualifier takes three arguments: the signing key, a flag specifying
whether address discrimination should be used, and a non-negative
integer that is used for additional discrimination.

```
typedef void (*my_callback)(const void*);
my_callback __ptrauth(ptrauth_key_process_dependent_code, 1, 0xe27a) callback;
```

Co-Authored-By: John McCall rjmccall@apple.com</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The qualifier allows programmer to directly control how pointers are
signed when they are stored in a particular variable.

The qualifier takes three arguments: the signing key, a flag specifying
whether address discrimination should be used, and a non-negative
integer that is used for additional discrimination.

```
typedef void (*my_callback)(const void*);
my_callback __ptrauth(ptrauth_key_process_dependent_code, 1, 0xe27a) callback;
```

Co-Authored-By: John McCall rjmccall@apple.com</pre>
</div>
</content>
</entry>
<entry>
<title>[libcxxabi] Use __LDBL_MANT_DIG__ for configuring demangling of long doubles (#134976)</title>
<updated>2025-04-11T05:54:11+00:00</updated>
<author>
<name>Martin Storsjö</name>
<email>martin@martin.st</email>
</author>
<published>2025-04-11T05:54:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3b70715c13876c51542ebfe2e3f4ee908f6785cb'/>
<id>3b70715c13876c51542ebfe2e3f4ee908f6785cb</id>
<content type='text'>
This avoids needing to hardcode the mapping between architectures and
their sizes of long doubles.

This fixes a case in test_demangle.pass.cpp, that previously failed like
this (XFAILed):

    .---command stdout------------
    | Testing 29859 symbols.
| _ZN5test01hIfEEvRAcvjplstT_Le4001a000000000000000E_c should be invalid
but is not
| Got: 0, void test0::h&lt;float&gt;(char (&amp;) [(unsigned int)(sizeof (float) +
0x0.07ff98f7ep-1022L)])
    `-----------------------------
    .---command stderr------------
| Assertion failed: !passed &amp;&amp; "demangle did not fail", file
libcxxabi/test/test_demangle.pass.cpp, line 30338
    `-----------------------------

This testcase is defined within

// Is long double fp80? (Only x87 extended double has 64-bit mantissa)
    #define LDBL_FP80 (__LDBL_MANT_DIG__ == 64)
    ...
    #if !LDBL_FP80
    ...
    #endif

The case failed on x86 architectures with an unusual size for long
doubles, as the test expected the demangler to not be able to demangle
an 80 bit long double (based on the `__LDBL_MANT_DIG__ == 64` condition
in the test). However as the libcxxabi implementation was hardcoded to
demangle 80 bit long doubles on x86_64 regardless of the actual size,
this test failed (by unexpectedly being able to demangle it).

By configuring libcxxabi's demangling of long doubles to match what the
compiler specifies, we no longer hit the expected failures in the
test_demangle.pass.cpp test on Android on x86.

This makes libcxxabi require a GCC-compatible compiler that defines
nonstandard defines like `__LDBL_MANT_DIG__`, but I presume that's
already essentially required anyway.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids needing to hardcode the mapping between architectures and
their sizes of long doubles.

This fixes a case in test_demangle.pass.cpp, that previously failed like
this (XFAILed):

    .---command stdout------------
    | Testing 29859 symbols.
| _ZN5test01hIfEEvRAcvjplstT_Le4001a000000000000000E_c should be invalid
but is not
| Got: 0, void test0::h&lt;float&gt;(char (&amp;) [(unsigned int)(sizeof (float) +
0x0.07ff98f7ep-1022L)])
    `-----------------------------
    .---command stderr------------
| Assertion failed: !passed &amp;&amp; "demangle did not fail", file
libcxxabi/test/test_demangle.pass.cpp, line 30338
    `-----------------------------

This testcase is defined within

// Is long double fp80? (Only x87 extended double has 64-bit mantissa)
    #define LDBL_FP80 (__LDBL_MANT_DIG__ == 64)
    ...
    #if !LDBL_FP80
    ...
    #endif

The case failed on x86 architectures with an unusual size for long
doubles, as the test expected the demangler to not be able to demangle
an 80 bit long double (based on the `__LDBL_MANT_DIG__ == 64` condition
in the test). However as the libcxxabi implementation was hardcoded to
demangle 80 bit long doubles on x86_64 regardless of the actual size,
this test failed (by unexpectedly being able to demangle it).

By configuring libcxxabi's demangling of long doubles to match what the
compiler specifies, we no longer hit the expected failures in the
test_demangle.pass.cpp test on Android on x86.

This makes libcxxabi require a GCC-compatible compiler that defines
nonstandard defines like `__LDBL_MANT_DIG__`, but I presume that's
already essentially required anyway.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++abi][ItaniumDemangle] Demangle DF16b as std::bfloat16_t (#120109)</title>
<updated>2025-01-13T21:15:40+00:00</updated>
<author>
<name>Fraser Cormack</name>
<email>fraser@codeplay.com</email>
</author>
<published>2025-01-13T21:15:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a100fd8cbd3dad3846a6212d97279ca23db85c75'/>
<id>a100fd8cbd3dad3846a6212d97279ca23db85c75</id>
<content type='text'>
This mangling is official in the Itanium C++ ABI specification and is
already supported by clang.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This mangling is official in the Itanium C++ ABI specification and is
already supported by clang.</pre>
</div>
</content>
</entry>
<entry>
<title>NFC: clang-format test_demangle.pass.cpp but keep test "lines"</title>
<updated>2024-12-15T01:01:23+00:00</updated>
<author>
<name>Hubert Tong</name>
<email>hubert.reinterpretcast@gmail.com</email>
</author>
<published>2024-12-15T00:37:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d33bf2e9df578ff7e44fd22504d6ad5a122b7ee6'/>
<id>d33bf2e9df578ff7e44fd22504d6ad5a122b7ee6</id>
<content type='text'>
Add clang-format on/off around test "lines"

Run clang-format without breaking string literals:
clang-format --style='{BasedOnStyle: llvm, BreakStringLiterals: false}'
-i test_demangle.pass.cpp

Add clang-format on/off on fp_literal_cases

Fixups: Split UNSUPPORTED to next line; xfail_cases trailing comma

Replace physical tab
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add clang-format on/off around test "lines"

Run clang-format without breaking string literals:
clang-format --style='{BasedOnStyle: llvm, BreakStringLiterals: false}'
-i test_demangle.pass.cpp

Add clang-format on/off on fp_literal_cases

Fixups: Split UNSUPPORTED to next line; xfail_cases trailing comma

Replace physical tab
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++abi] Enable demangling of `cp` expression production (#114882)</title>
<updated>2024-12-11T00:24:15+00:00</updated>
<author>
<name>Hubert Tong</name>
<email>hubert.reinterpretcast@gmail.com</email>
</author>
<published>2024-12-11T00:24:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=918d4558b0bad366ecadd411ed48cf64728c68d7'/>
<id>918d4558b0bad366ecadd411ed48cf64728c68d7</id>
<content type='text'>
See itanium-cxx-abi/cxx-abi#196</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See itanium-cxx-abi/cxx-abi#196</pre>
</div>
</content>
</entry>
<entry>
<title>[demangler] Enhance demangling in llvm-cxxfilt for fixed-point types. (#114257)</title>
<updated>2024-11-04T16:18:31+00:00</updated>
<author>
<name>c8ef</name>
<email>c8ef@outlook.com</email>
</author>
<published>2024-11-04T16:18:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7da9da0b1902fe04985753d20dd37a9edd05dd41'/>
<id>7da9da0b1902fe04985753d20dd37a9edd05dd41</id>
<content type='text'>
This patch adds support for fixed-point type in demanger.

Closes #114090.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds support for fixed-point type in demanger.

Closes #114090.</pre>
</div>
</content>
</entry>
</feed>
