Work around a Visual C++ bug.
authorPaul Robinson <paul.robinson@sony.com>
Thu, 23 May 2019 15:07:46 +0000 (15:07 +0000)
committerPaul Robinson <paul.robinson@sony.com>
Thu, 23 May 2019 15:07:46 +0000 (15:07 +0000)
commit3f600639dc75bae8f66acee3135d93aae8d36993
tree2d96767cb2dd6d8d34873dbd2c85f35fdfb447af
parent50daf71e99bcbf980f7a4ac067f868cafc7cca67
Work around a Visual C++ bug.

Using a static function as a template parameter gets a bogus compile-time
error with Visual Studio 2017, prior to version 15.8. Our current
minimum-version requirement is a particular update to VS2015, and we
assume all Visual Studio 2017 versions are usable. This patch makes the
code buildable with older versions of VS2017, and can be reverted after
we upgrade the minimum version sometime in the future.

Description of the Microsoft bug:
https://developercommunity.visualstudio.com/content/problem/25334/error-code-c2971-when-specifying-a-function-as-the.html

Differential Revision: https://reviews.llvm.org/D62202

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361502 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Tooling/Refactoring/RangeSelector.cpp