[cfe-dev] Accessing File Types with clang-tidy
Stephen Kelly via cfe-dev
cfe-dev at lists.llvm.org
Tue Oct 16 00:55:38 PDT 2018
On 16/10/18 00:42, Shyan Akmal via cfe-dev wrote:
> I've been doing some work on writing a check with clang-tidy. I want my
> check to behave differently on header files than on implementation files.
> My current plan is to do this by looking at the extension of the file
> type (and assume the file is not a header file if the extension is of
> the form ".c*").
You can do that with the AST Matcher isExpansionInFileMatching().
More information about the cfe-dev