[PATCH] D82937: Fix `isInfixBinaryOp` that returned true for postfix ++
Eduardo Caldas via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 1 02:07:46 PDT 2020
eduucaldas added a reviewer: gribozavr2.
eduucaldas marked 2 inline comments as done.
eduucaldas added inline comments.
================
Comment at: clang/unittests/Tooling/CXXOperatorCallExprTest.cpp:1
+//===- unittests/Tooling/CXXOperatorCallExprTest.cpp ----------------------===//
+//
----------------
This file is in the `unittests/Tooling` instead in the `unittests/AST` directory because I wanted to have access to the `TestVisitor` infrastructure. I know the solution is not optimal and I am looking for suggestions
================
Comment at: clang/unittests/Tooling/CXXOperatorCallExprTest.cpp:29
+
+ struct Visitor : TestVisitor<Visitor> {
+ bool VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
----------------
Previous code do something else. Look at `CallsVisitor` in `clang/unittests/Tooling/SourceCodeTest.cpp` . I prefer this approach because
* The whole logic is then inside the the test case
* There is not a big addition to lines of code
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82937/new/
https://reviews.llvm.org/D82937
More information about the cfe-commits
mailing list