[PATCH] D83966: Enable the test for hasArraySize() AST matcher in all language modes
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 20 01:24:16 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb6073ee9ae84: Enable the test for hasArraySize() AST matcher in all language modes (authored by gribozavr).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83966/new/
https://reviews.llvm.org/D83966
Files:
clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
Index: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
===================================================================
--- clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
+++ clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
@@ -3219,13 +3219,13 @@
}
TEST_P(ASTMatchersTest, HasArraySize) {
- if (GetParam().Language != Lang_CXX03) {
- // FIXME: Fix this test to work in all C++ language modes.
+ if (!GetParam().isCXX()) {
return;
}
EXPECT_TRUE(matches("struct MyClass {}; MyClass *p1 = new MyClass[10];",
- cxxNewExpr(hasArraySize(integerLiteral(equals(10))))));
+ cxxNewExpr(hasArraySize(
+ ignoringParenImpCasts(integerLiteral(equals(10)))))));
}
TEST_P(ASTMatchersTest, HasDefinition_MatchesStructDefinition) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83966.279140.patch
Type: text/x-patch
Size: 838 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200720/7cfbad36/attachment.bin>
More information about the cfe-commits
mailing list