summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/cpp11-migrate/UseNullptr/basic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/test/cpp11-migrate/UseNullptr/basic.cpp')
-rw-r--r--clang-tools-extra/test/cpp11-migrate/UseNullptr/basic.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/clang-tools-extra/test/cpp11-migrate/UseNullptr/basic.cpp b/clang-tools-extra/test/cpp11-migrate/UseNullptr/basic.cpp
index 46cc9cf83dc..c84758e1cd2 100644
--- a/clang-tools-extra/test/cpp11-migrate/UseNullptr/basic.cpp
+++ b/clang-tools-extra/test/cpp11-migrate/UseNullptr/basic.cpp
@@ -8,6 +8,7 @@
const unsigned int g_null = 0;
#define NULL 0
+// CHECK: #define NULL 0
void test_assignment() {
int *p1 = 0;
@@ -179,32 +180,6 @@ int test_function_return6() {
// CHECK: return g_null;
}
-// Test function-like macros where the parameter to the macro (expression)
-// results in a nullptr.
-void __dummy_assert_fail() {}
-
-void test_function_like_macro1() {
- // This tests that the CastSequenceVisitor is working properly.
-#define my_assert(expr) \
- ((expr) ? static_cast<void>(expr) : __dummy_assert_fail())
-
- int *p;
- my_assert(p != 0);
- // CHECK: my_assert(p != nullptr);
-#undef my_assert
-}
-
-void test_function_like_macro2() {
- // This tests that the implicit cast is working properly.
-#define my_macro(expr) \
- (expr)
-
- int *p;
- my_macro(p != 0);
- // CHECK: my_macro(p != nullptr);
-#undef my_macro
-}
-
// Test parentheses expressions resulting in a nullptr.
int *test_parentheses_expression1() {
return(0);
OpenPOWER on IntegriCloud