diff options
Diffstat (limited to 'clang-tools-extra/test/cpp11-migrate/PassByValue/basic.h')
| -rw-r--r-- | clang-tools-extra/test/cpp11-migrate/PassByValue/basic.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/clang-tools-extra/test/cpp11-migrate/PassByValue/basic.h b/clang-tools-extra/test/cpp11-migrate/PassByValue/basic.h new file mode 100644 index 00000000000..4b551f7d908 --- /dev/null +++ b/clang-tools-extra/test/cpp11-migrate/PassByValue/basic.h @@ -0,0 +1,23 @@ +#ifndef BASIC_H +#define BASIC_H + +// POD types are trivially move constructible +struct Movable { + int a, b, c; +}; + +struct NotMovable { + NotMovable() = default; + NotMovable(const NotMovable &) = default; + NotMovable(NotMovable &&) = delete; + int a, b, c; +}; + +// The test runs the migrator without header modifications enabled for this +// header making the constructor parameter M unmodifiable. +struct UnmodifiableClass { + UnmodifiableClass(const Movable &M); + Movable M; +}; + +#endif // BASIC_H |

