diff options
Diffstat (limited to 'clang-tools-extra/test/cpp11-migrate')
-rw-r--r-- | clang-tools-extra/test/cpp11-migrate/UseNullptr/nullptr_t.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang-tools-extra/test/cpp11-migrate/UseNullptr/nullptr_t.cpp b/clang-tools-extra/test/cpp11-migrate/UseNullptr/nullptr_t.cpp new file mode 100644 index 00000000000..84ca100482e --- /dev/null +++ b/clang-tools-extra/test/cpp11-migrate/UseNullptr/nullptr_t.cpp @@ -0,0 +1,17 @@ +// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp +// RUN: cpp11-migrate -final-syntax-check -use-nullptr %t.cpp -- --std=c++11 -I %S +// RUN: FileCheck -input-file=%t.cpp %s +// XFAIL: * + +namespace std { typedef decltype(nullptr) nullptr_t; } + +// Just to make sure make_null() could have side effects. +void external(); + +std::nullptr_t make_null() { external(); return nullptr; } + +void *call_make_null() +{ + return make_null(); + // CHECK: return make_null(); +} |