[PATCH] D61774: [LibTooling] Add RangeSelector library for defining source ranges based on bound AST nodes.

Yitzhak Mandelbaum via cfe-commits cfe-commits at lists.llvm.org
Wed May 22 13:36:47 PDT 2019


I'm confused by the error given that getStatementsRange is a function
name.  I don't have Visual Studio -- can you find a fix and send a patch? I
wonder if taking the address explicitly is enough?  Or, if you know how to
trigger this error in clang or gcc, I can fix it myself.

On Wed, May 22, 2019 at 4:31 PM Petr Penzin via Phabricator <
reviews at reviews.llvm.org> wrote:

> penzn added inline comments.
>
>
> ================
> Comment at: cfe/trunk/lib/Tooling/Refactoring/RangeSelector.cpp:229
> +RangeSelector tooling::statements(StringRef ID) {
> +  return RelativeSelector<CompoundStmt, getStatementsRange>(ID);
> +}
> ----------------
> Sorry for posting here, haven't gotten my bugzilla access yet (requested
> though).
>
> This breaks with Visual Studio 2017 (15.7.6):
>
> RangeSelector.cpp(229): error C2971:
> '`anonymous-namespace'::RelativeSelector': template parameter 'Func':
> 'getStatementsRange': a variable with non-static storage duration cannot be
> used as a non-type argument
>
>
> Repository:
>   rL LLVM
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D61774/new/
>
> https://reviews.llvm.org/D61774
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190522/9cd67384/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4847 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190522/9cd67384/attachment-0001.bin>


More information about the cfe-commits mailing list