r257392 - PR26087: Use nonstandard MSVC extension for VS2015 as well.

James Y Knight via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 14:00:22 PST 2016


Author: jyknight
Date: Mon Jan 11 16:00:22 2016
New Revision: 257392

URL: http://llvm.org/viewvc/llvm-project?rev=257392&view=rev
Log:
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.

Modified:
    cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h

Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h?rev=257392&r1=257391&r2=257392&view=diff
==============================================================================
--- cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h (original)
+++ cfe/trunk/include/clang/ASTMatchers/ASTMatchersInternal.h Mon Jan 11 16:00:22 2016
@@ -560,10 +560,10 @@ bool matchesFirstInPointerRange(const Ma
 
 // 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 };




More information about the cfe-commits mailing list