diff options
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp')
-rw-r--r-- | clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp index fc1a57c4885..e521940983b 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp @@ -1206,6 +1206,12 @@ TEST(TypeMatching, MatchesAutoTypes) { // autoType(hasDeducedType(isInteger())))); } +TEST(TypeMatching, MatchesDeclTypes) { + EXPECT_TRUE(matches("decltype(1 + 1) sum = 1 + 1;", decltypeType())); + EXPECT_TRUE(matches("decltype(1 + 1) sum = 1 + 1;", + decltypeType(hasUnderlyingType(isInteger())))); +} + TEST(TypeMatching, MatchesFunctionTypes) { EXPECT_TRUE(matches("int (*f)(int);", functionType())); EXPECT_TRUE(matches("void f(int i) {}", functionType())); |