================
@@ -980,6 +980,8 @@ AST Matchers
 ------------
 - Add ``functionTypeLoc`` matcher for matching ``FunctionTypeLoc``.
 - Add missing support for ``TraversalKind`` in some ``addMatcher()`` overloads.
+- Fixed ``nullPointerConstant`` matcher falsely matching integer literal ``0``
----------------
AaronBallman wrote:

While you can swap the array and the index around in some language modes (so 
`array[idx]` and `idx[array]` are equivalent), that doesn't work with integer 
literals without casts and so we don't have to worry about a pathological case 
like: `int index = 0; index[0];` Phew. :-D

That said, I think this isn't quite accurate because you're also fixing other 
false positives like `int *ptr; ptr + 0;`: https://godbolt.org/z/hhMoTW7e8

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