Inline variables is a feature from C++17. It makes sense
to extend the isInline matcher in order to support corresponding varDecls.
Details
Details
- Reviewers
klimek aaron.ballman
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I am planning to reuse this matcher in my new checker (https://reviews.llvm.org/D118743, under development now), removing this line:
AST_MATCHER(VarDecl, isVarInline) { return Node.isInline(); }
P.S. If this review is eventually approved, kindly please merge the commit on my behalf =) As I don't have merge access. My name is Evgeny Shulgin and email is izaronplatz@gmail.com. Sorry for inconvenience!
clang/unittests/ASTMatchers/ASTMatchersInternalTest.cpp | ||
---|---|---|
195–201 | Isn't this test equivalent to the new one I wrote in the other file? The difference between TEST and TEST_P I see is that the latter one allows you to check C++17 code, while the former does not. So I decided to have all checks in one place. |
Comment Actions
Wow! That's a curious coincidence. I'm closing my PR =) Let it be your version as the earlier one.
Isn't this test equivalent to the new one I wrote in the other file? The difference between TEST and TEST_P I see is that the latter one allows you to check C++17 code, while the former does not. So I decided to have all checks in one place.