[PATCH] D82279: Handle invalid types in the nullPointerConstant AST matcher

2020-06-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks for the review! Committed in 8a9311940a26372dab6706edfd07288667394cfe CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82279/new/

[PATCH] D82279: Handle invalid types in the nullPointerConstant AST matcher

2020-06-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire accepted this revision. steveire added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:2618 + )"; + EXPECT_TRUE(matches(kTest, expr(nullPointerConstant(; }

[PATCH] D82279: Handle invalid types in the nullPointerConstant AST matcher

2020-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:2618 + )"; + EXPECT_TRUE(matches(kTest, expr(nullPointerConstant(; } steveire wrote: > While this

[PATCH] D82279: Handle invalid types in the nullPointerConstant AST matcher

2020-06-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:2618 + )"; + EXPECT_TRUE(matches(kTest, expr(nullPointerConstant(; } While this test in ASTMatchers might continue to make sense, shouldn't there be a

[PATCH] D82279: Handle invalid types in the nullPointerConstant AST matcher

2020-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: rsmith, steveire, klimek, gribozavr. Currently, using the nullPointerConstant AST matcher can lead to assertions in situations where a node to be matched does not have a valid type associated with it, such as a ParenListExpr.