[all-commits] [llvm/llvm-project] 81595e: [Clang][Sema] Add a test for move ctor calling for...
Pavel Samolysov via All-commits
all-commits at lists.llvm.org
Sun Jul 28 03:45:20 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 81595e9178eedc18dfcace9ac412f20697497f9f
https://github.com/llvm/llvm-project/commit/81595e9178eedc18dfcace9ac412f20697497f9f
Author: Pavel Samolysov <samolisov at gmail.com>
Date: 2024-07-28 (Sun, 28 Jul 2024)
Changed paths:
A clang/test/AST/explicit-base-class-move-cntr.cpp
Log Message:
-----------
[Clang][Sema] Add a test for move ctor calling for a base class. NFC (#97164)
When clang compiles the following expression:
```c++
return A{B{"Move Ctor"}};
```
(where `B` is a base class for `A`), it adds a call to the move
constructor of `B`. When the code is changed to...
```c++
return A{{"No Move Ctor"}};
```
... a move constructor is invoked neither for `A` nor for `B`.
The lit test demonstrates the difference in the generated AST.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list