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)
commitc63b37dd408eb49ed056e97e50a275026b2545b9
tree993976559caec23199547c623147359ca64026e3
parent0857a4ec20db4b038fb5346ed09e3253842f0169
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

llvm-svn: 361502
clang/lib/Tooling/Refactoring/RangeSelector.cpp