================
@@ -4049,6 +4049,7 @@ TEST_P(ASTMatchersTest, NullPointerConstant) {
   EXPECT_TRUE(matches("char *cp = (char *)0;", expr(nullPointerConstant())));
   EXPECT_TRUE(matches("int *ip = 0;", expr(nullPointerConstant())));
   EXPECT_FALSE(matches("int i = 0;", expr(nullPointerConstant())));
+  EXPECT_FALSE(matches("int *p[1]; (void)p[0];", expr(nullPointerConstant())));
----------------
AaronBallman wrote:

> Do people do this on purpose?

I mostly am used to seeing it as a trivia question rather than anything people 
use in practice, but that kind of code does exist in the wild unfortunately.

https://github.com/llvm/llvm-project/pull/201893
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to