[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / clang / unittests / Tooling / RecursiveASTVisitorTests / ParenExpr.cpp
blob89ccf20587ad061e146dfbc882f62c66eb9888a8
1 //===- unittest/Tooling/RecursiveASTVisitorTests/ParenExpr.cpp ------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "TestVisitor.h"
11 using namespace clang;
13 namespace {
15 class ParenExprVisitor : public ExpectedLocationVisitor {
16 public:
17 bool VisitParenExpr(ParenExpr *Parens) override {
18 Match("", Parens->getExprLoc());
19 return true;
23 TEST(RecursiveASTVisitor, VisitsParensDuringDataRecursion) {
24 ParenExprVisitor Visitor;
25 Visitor.ExpectMatch("", 1, 9);
26 EXPECT_TRUE(Visitor.runOver("int k = (4) + 9;\n"));
29 } // end anonymous namespace