History log of /llvm-project/clang/test/AST/ByteCode/builtin-functions.cpp (Results 1 – 25 of 35)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7
# fd6baa47 09-Jan-2025 Timm Baeder <tbaeder@redhat.com>

[clang][ExprConst] Add diagnostics for invalid binary arithmetic (#118475)

... between unrelated declarations or literals.

Leaving this small (I haven't run the whole test suite locally) to get
som

[clang][ExprConst] Add diagnostics for invalid binary arithmetic (#118475)

... between unrelated declarations or literals.

Leaving this small (I haven't run the whole test suite locally) to get
some feedback on the wording and implementation first.

The output of the sample in
https://github.com/llvm/llvm-project/issues/117409 is now:
```console
./array.cpp:57:6: warning: expression result unused [-Wunused-value]
57 | am - aj.af();
| ~~ ^ ~~~~~~~
./array.cpp:70:8: error: call to consteval function 'L::L<bx>' is not a constant expression
70 | q(0, [] {
| ^
./array.cpp:57:6: note: arithmetic on addresses of literals has unspecified value
57 | am - aj.af();
| ^
./array.cpp:62:5: note: in call to 'al(&""[0], {&""[0]})'
62 | al(bp.af(), k);
| ^~~~~~~~~~~~~~
./array.cpp:70:8: note: in call to 'L<bx>({})'
70 | q(0, [] {
| ^~~~
71 | struct bx {
| ~~~~~~~~~~~
72 | constexpr operator ab<g<l<decltype(""[0])>::e>::e>() { return t(""); }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 | };
| ~~
74 | return bx();
| ~~~~~~~~~~~~
75 | }());
| ~~~
```

The output for
```c++
int a, b;
constexpr int n = &b - &a
```

is now:
```console
./array.cpp:80:15: error: constexpr variable 'n' must be initialized by a constant expression
80 | constexpr int n = &b - &a;
| ^ ~~~~~~~
./array.cpp:80:22: note: arithmetic involving '&b' and '&a' has unspecified value
80 | constexpr int n = &b - &a;
| ^
1 error generated.

```

show more ...


# 34097c07 02-Jan-2025 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Consider unknown-size arrays in memcpy/memcmp (#121462)

When emitting diagnostics for the number of elements.


# d5c8af49 02-Jan-2025 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Consider start index when copying composite array (#121461)

... elements.


# f0d60170 31-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Check memove/memcpy for available elements (#121383)

Both destination and source pointer need to have at least as many
elements as requested.


# 1f2d9345 19-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Support pointers in __builtin_mem{move,cpy} (#120560)

Unfortunately, that means we can't use the __builtin_bit_cast
implementation for this.


Revision tags: llvmorg-19.1.6
# dd6f6a09 16-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Handle builtin_wmemcmp (#120070)


# 98470c0b 12-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Handle __builtin_bcmp (#119678)

... the same as `__builtin_memcmp`. Also fix a bug we still had when we
couldn't find a difference in the two inputs after `Size` bytes.


# 8713914d 12-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Handle __builtin_memcmp (#119544)


# 4dde52d7 11-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Check for overlapping memcpy regions (#119535)


# ce158734 10-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Allow checking builtin functions... (#119328)

... in checkingPotentialConstantExpression mode. This is what the
current interpreter does, yet it doesn't do so for
`__builtin_operat

[clang][bytecode] Allow checking builtin functions... (#119328)

... in checkingPotentialConstantExpression mode. This is what the
current interpreter does, yet it doesn't do so for
`__builtin_operator_new`.

show more ...


# 6168739f 09-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Reject memcpy sizes with element size remainder (#119209)


# d17e51f3 09-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Handle __builtin_strncmp (#119208)


# 00b50c91 09-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Handle __builtin_wcslen (#119187)

Handle different char widths in builtin_strlen.


# abc27039 05-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Pass __builtin_memcpy size along (#118649)

To DoBitCastPtr, so we know how many bytes we want to read.


# 61c2ac03 03-Dec-2024 Timm Bäder <tbaeder@redhat.com>

Revert "[clang][bytecode] Handle __builtin_wcslen (#118446)"

This reverts commit 89a0ee89973c3d213c4bc11c26b41eab67e06da0.

This breaks builders:
https://lab.llvm.org/buildbot/#/builders/13/builds/3

Revert "[clang][bytecode] Handle __builtin_wcslen (#118446)"

This reverts commit 89a0ee89973c3d213c4bc11c26b41eab67e06da0.

This breaks builders:
https://lab.llvm.org/buildbot/#/builders/13/builds/3885

show more ...


# 3f39c5df 03-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Reject memcpy dummy pointers after null check (#118460)

To match the diagnostic output of the current interpreter.


# 0f4dc427 03-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Initialize elements in __builtin_elementwise_popcount (#118457)


# 89a0ee89 03-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Handle __builtin_wcslen (#118446)

... just like strlen.


Revision tags: llvmorg-19.1.5
# 78955136 03-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Handle memmove like memcpy (#118431)

This is the same thing for us, except for diagnostic differences.


# fc9052ee 03-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Check __builtin_memcpy for null pointers (#118313)


# 637a1ae8 02-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Implement __builtin_elementwise_popcount (#118307)


# b587b910 02-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Implement __builtin_reduce_xor (#118299)


# 1288f6d4 02-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Implement __builtin_reduce_or (#118292)


# ccc471fe 02-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Implement __builtin_reduce_and (#118289)


# c1dcf75a 02-Dec-2024 Timm Baeder <tbaeder@redhat.com>

[clang][bytecode] Implement __builtin_reduce_mul (#118287)


12