diff options
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.h')
-rw-r--r-- | clang/unittests/ASTMatchers/ASTMatchersTest.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.h b/clang/unittests/ASTMatchers/ASTMatchersTest.h index 235e6fbde2d..fe8fcfd5894 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersTest.h +++ b/clang/unittests/ASTMatchers/ASTMatchersTest.h @@ -126,6 +126,13 @@ testing::AssertionResult matchesC(const std::string &Code, const T &AMatcher) { } template <typename T> +testing::AssertionResult matchesC99(const std::string &Code, + const T &AMatcher) { + return matchesConditionally(Code, AMatcher, true, "-std=c99", + FileContentMappings(), "input.c"); +} + +template <typename T> testing::AssertionResult notMatchesC(const std::string &Code, const T &AMatcher) { return matchesConditionally(Code, AMatcher, false, "", FileContentMappings(), |