diff options
Diffstat (limited to 'clang-tools-extra/test/cpp11-migrate/UseAuto/new_cv_failing.cpp')
-rw-r--r-- | clang-tools-extra/test/cpp11-migrate/UseAuto/new_cv_failing.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/clang-tools-extra/test/cpp11-migrate/UseAuto/new_cv_failing.cpp b/clang-tools-extra/test/cpp11-migrate/UseAuto/new_cv_failing.cpp new file mode 100644 index 00000000000..8e21018ef90 --- /dev/null +++ b/clang-tools-extra/test/cpp11-migrate/UseAuto/new_cv_failing.cpp @@ -0,0 +1,36 @@ +// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp +// RUN: cpp11-migrate -use-auto %t.cpp -- -std=c++11 +// RUN: FileCheck -input-file=%t.cpp %s +// XFAIL: * + +// None of these tests can pass right now because TypeLoc information where CV +// qualifiers are concerned is not reliable/available. + +class MyType { +}; + +int main (int argc, char **argv) { + const MyType *d = new MyType(); + // CHECK: const auto *d = new MyType(); + + volatile MyType *d2 = new MyType(); + // CHECK: volatile auto *d2 = new MyType(); + + const MyType * volatile e = new MyType(); + // CHECK: const auto * volatile d = new MyType(); + + volatile MyType * const f = new MyType(); + // CHECK: volatile auto * const d2 = new MyType(); + + const MyType *d5 = new const MyType(); + // CHECK: auto d5 = new const MyType(); + + volatile MyType *d6 = new volatile MyType(); + // CHECK: auto d6 = new volatile MyType(); + + const MyType * const d7 = new const MyType(); + // CHECK: const auto d7 = new const MyType(); + + volatile MyType * volatile d8 = new volatile MyType(); + // CHECK: volatile auto d8 = new volatile MyType(); +} |