]> granicus.if.org Git - clang/commitdiff
PR26087: Use nonstandard MSVC extension for VS2015 as well.
authorJames Y Knight <jyknight@google.com>
Mon, 11 Jan 2016 22:00:22 +0000 (22:00 +0000)
committerJames Y Knight <jyknight@google.com>
Mon, 11 Jan 2016 22:00:22 +0000 (22:00 +0000)
In r256564, I had conditioned the workaround in has_getDecl to only be
used for MSVC before the 2015 release, believing that 2015 could handle
the standard code. But, that was incorrect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257392 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/ASTMatchers/ASTMatchersInternal.h

index d49909183fd4330d3feb007b621716d9e651bc3e..1d1d7952c1667683654ee81a708d4c909358adb6 100644 (file)
@@ -560,10 +560,10 @@ bool matchesFirstInPointerRange(const MatcherT &Matcher, IteratorT Start,
 
 // Metafunction to determine if type T has a member called
 // getDecl.
-#if defined(_MSC_VER) && (_MSC_VER < 1900) && !defined(__clang__)
-// For old versions of MSVC, we use a weird nonstandard __if_exists
-// statement, since before MSVC2015, it was not standards-conformant
-// enough to compile the usual code below.
+#if defined(_MSC_VER) && !defined(__clang__)
+// For MSVC, we use a weird nonstandard __if_exists statement, as it
+// is not standards-conformant enough to properly compile the standard
+// code below. (At least up through MSVC 2015 require this workaround)
 template <typename T> struct has_getDecl {
   __if_exists(T::getDecl) {
     enum { value = 1 };