diff --git a/clang/test/SemaCXX/anonymous-union.cpp b/clang/test/SemaCXX/anonymous-union.cpp
index 3b568fd8704f..46d426cf0c0f 100644
--- a/clang/test/SemaCXX/anonymous-union.cpp
+++ b/clang/test/SemaCXX/anonymous-union.cpp
@@ -80,12 +80,12 @@ union { // expected-error{{anonymous unions at namespace or global scope must be
 };
 
 static union {
-  int int_val2;
+  int int_val2; // expected-note{{previous definition is here}}
   float float_val2;
 };
 
 void PR21858() {
-  void int_val2();
+  void int_val2(); // expected-error{{redefinition of 'int_val2' as different kind of symbol}}
 }
 
 void f() {