summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cstyle-cast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/cstyle-cast.cpp')
-rw-r--r--clang/test/SemaCXX/cstyle-cast.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/SemaCXX/cstyle-cast.cpp b/clang/test/SemaCXX/cstyle-cast.cpp
index afac6a137ec..2327d7b51d9 100644
--- a/clang/test/SemaCXX/cstyle-cast.cpp
+++ b/clang/test/SemaCXX/cstyle-cast.cpp
@@ -84,11 +84,11 @@ void t_529_2()
(void)(void*)((int*)0);
(void)(volatile const void*)((const int*)0);
(void)(A*)((B*)0);
- (void)(A&)(*((B*)0));
+ (void)(A&)(*((B*)0)); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}}
(void)(const B*)((C1*)0);
- (void)(B&)(*((C1*)0));
+ (void)(B&)(*((C1*)0)); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}}
(void)(A*)((D*)0);
- (void)(const A&)(*((D*)0));
+ (void)(const A&)(*((D*)0)); // expected-warning {{binding dereferenced null pointer to reference has undefined behavior}}
(void)(int B::*)((int A::*)0);
(void)(void (B::*)())((void (A::*)())0);
(void)(A*)((E*)0); // C-style cast ignores access control
OpenPOWER on IntegriCloud