From: Will Wilson Date: Tue, 27 Oct 2015 17:01:10 +0000 (+0000) Subject: [MSVC] Workaround for ICE in cl.exe when compiling ASTContext.cpp in Release Win32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76487e6f2db714ff24bced0555f1401a3ac57d47;p=clang [MSVC] Workaround for ICE in cl.exe when compiling ASTContext.cpp in Release Win32 Microsoft connect bug: https://connect.microsoft.com/VisualStudio/feedback/details/1741530 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251415 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index dabc6f60dd..a27f9b37d2 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -366,8 +366,10 @@ const RawComment *ASTContext::getRawCommentForAnyRedecl( OriginalDeclForRC = I; RawCommentAndCacheFlags Raw; if (RC) { - Raw.setRaw(RC); + // Call order swapped to work around ICE in VS2015 RTM (Release Win32) + // https://connect.microsoft.com/VisualStudio/feedback/details/1741530 Raw.setKind(RawCommentAndCacheFlags::FromDecl); + Raw.setRaw(RC); } else Raw.setKind(RawCommentAndCacheFlags::NoCommentInDecl); Raw.setOriginalDecl(I);