diff options
| author | Bill Wendling <isanbard@gmail.com> | 2018-11-09 00:41:36 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2018-11-09 00:41:36 +0000 |
| commit | 8003edc9aa0160c777252b6ed8e96fc35f039bd4 (patch) | |
| tree | d6a07c2e0b407f57baf6be744b81ef140079eb7d /clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp | |
| parent | 009cc9b7cadc81b50127f14ccdb8ff10fccc1f00 (diff) | |
| download | llvm-8003edc9aa0160c777252b6ed8e96fc35f039bd4.zip llvm-8003edc9aa0160c777252b6ed8e96fc35f039bd4.tar.gz llvm-8003edc9aa0160c777252b6ed8e96fc35f039bd4.tar.bz2 | |
Compound literals, enums, et al require const expr
Summary:
Compound literals, enums, file-scoped arrays, etc. require their
initializers and size specifiers to be constant. Wrap the initializer
expressions in a ConstantExpr so that we can easily check for this later
on.
Reviewers: rsmith, shafik
Reviewed By: rsmith
Subscribers: cfe-commits, jyknight, nickdesaulniers
Differential Revision: https://reviews.llvm.org/D53921
llvm-svn: 346455
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp')
| -rw-r--r-- | clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp index b40289fc..55f9a9a 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp @@ -760,23 +760,23 @@ TEST(Matcher, Initializers) { has( designatedInitExpr( designatorCountIs(2), - has(floatLiteral( + hasDescendant(floatLiteral( equals(1.0))), - has(integerLiteral( + hasDescendant(integerLiteral( equals(2))))), has( designatedInitExpr( designatorCountIs(2), - has(floatLiteral( + hasDescendant(floatLiteral( equals(2.0))), - has(integerLiteral( + hasDescendant(integerLiteral( equals(2))))), has( designatedInitExpr( designatorCountIs(2), - has(floatLiteral( + hasDescendant(floatLiteral( equals(1.0))), - has(integerLiteral( + hasDescendant(integerLiteral( equals(0))))) ))))); } |
