[cfe-dev] [clang-tidy] Adding a new use nodiscard checker (help needed)

Stephen Kelly via cfe-dev cfe-dev at lists.llvm.org
Thu Dec 6 11:19:03 PST 2018

On 06/12/2018 19:08, MyDeveloper Day via cfe-dev wrote:
> I'm currently using (following a series of trail and errors) to find the 
> location just before the return type

Here are the locations you can get for FunctionDecls:


See also if you have not already:


If there isn't a location in that output for what you need, then you are 
going to have to check the tokens yourself. Many existing clang tidy 
checks do things like this due to lack of location for a particular need.



More information about the cfe-dev mailing list