Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 5e42afd

Browse files
committed
1 parent 45e006d commit 5e42afd

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

include/clang/ASTMatchers/ASTMatchersInternal.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -560,10 +560,10 @@ bool matchesFirstInPointerRange(const MatcherT &Matcher, IteratorT Start,
560560

561561
// Metafunction to determine if type T has a member called
562562
// getDecl.
563-
#if defined(_MSC_VER) && (_MSC_VER < 1900) && !defined(__clang__)
564-
// For old versions of MSVC, we use a weird nonstandard __if_exists
565-
// statement, since before MSVC2015, it was not standards-conformant
566-
// enough to compile the usual code below.
563+
#if defined(_MSC_VER) && !defined(__clang__)
564+
// For MSVC, we use a weird nonstandard __if_exists statement, as it
565+
// is not standards-conformant enough to properly compile the standard
566+
// code below. (At least up through MSVC 2015 require this workaround)
567567
template <typename T> struct has_getDecl {
568568
__if_exists(T::getDecl) {
569569
enum { value = 1 };

unittests/ASTMatchers/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ set(LLVM_LINK_COMPONENTS
55
add_clang_unittest(ASTMatchersTests
66
ASTMatchersTest.cpp)
77

8+
# XXX Emscripten: Hotfix for bug https://llvm.org/bugs/show_bug.cgi?id=26089
9+
if (MSVC)
10+
set_source_files_properties(ASTMatchersTest.cpp PROPERTIES COMPILE_FLAGS /bigobj)
11+
endif()
12+
813
target_link_libraries(ASTMatchersTests
914
clangAST
1015
clangASTMatchers

unittests/Tooling/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ add_clang_unittest(ToolingTests
1919
ReplacementsYamlTest.cpp
2020
)
2121

22+
# XXX Emscripten: Hotfix for bug https://llvm.org/bugs/show_bug.cgi?id=26089
23+
if (MSVC)
24+
set_source_files_properties(RecursiveASTVisitorTestExprVisitor.cpp PROPERTIES COMPILE_FLAGS /bigobj)
25+
endif()
26+
2227
target_link_libraries(ToolingTests
2328
clangAST
2429
clangASTMatchers

0 commit comments

Comments
 (0)