From: James Y Knight Date: Mon, 11 Jan 2016 22:00:22 +0000 (+0000) Subject: PR26087: Use nonstandard MSVC extension for VS2015 as well. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d22eccf82560826415ac761375a9ea8bace7c899;p=clang PR26087: Use nonstandard MSVC extension for VS2015 as well. 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 --- diff --git a/include/clang/ASTMatchers/ASTMatchersInternal.h b/include/clang/ASTMatchers/ASTMatchersInternal.h index d49909183f..1d1d7952c1 100644 --- a/include/clang/ASTMatchers/ASTMatchersInternal.h +++ b/include/clang/ASTMatchers/ASTMatchersInternal.h @@ -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 struct has_getDecl { __if_exists(T::getDecl) { enum { value = 1 };