[cfe-users] Calling match in a clang-tidy check's check method

2020-01-15 Thread Lewis, Cannada via cfe-users
Is there a way to get a non const reference to the ASTContext inside of a clang tidy check? I have two reasons I want this. 1. To do matches on specific nodes like below. void MyCheck::check(const MatchFinder::MatchResult &Result) { auto const *Lambda = Result.Nodes.getNodeAs("Lambda

[cfe-users] Clang-tidy lexer util issue.

2020-02-17 Thread Lewis, Cannada via cfe-users
I am trying to use the getPreviousToken function from clang-tools-extra/clang-tidy/utils

Re: [cfe-users] Clang-tidy lexer util issue.

2020-02-18 Thread Lewis, Cannada via cfe-users
I was able to solve my problem by making sure to get the expansion location before calling getPreviousToken. On Feb 17, 2020, at 5:42 PM, Lewis, Cannada mailto:canl...@sandia.gov>> wrote: I am trying to use the getPreviousToken function from clang-tools-extra

[cfe-users] Determining if a template type came from a typedef in clang-tidy

2020-04-29 Thread Lewis, Cannada via cfe-users
I have the following example: In a header somewhere: namespace Kokkos { using DefaultHostExecutionSpace = Serial; } In a different header somewhere namespace Kokkos{ template class RangePolicy; } struct GoodClass { int foo; KOKKOS_INLINE_FUNCTION GoodClass(int f) : foo(f) {} KOKKOS_IN