]> granicus.if.org Git - clang/commitdiff
[MSVC] Workaround for ICE in cl.exe when compiling ASTContext.cpp in Release Win32
authorWill Wilson <will@indefiant.com>
Tue, 27 Oct 2015 17:01:10 +0000 (17:01 +0000)
committerWill Wilson <will@indefiant.com>
Tue, 27 Oct 2015 17:01:10 +0000 (17:01 +0000)
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

lib/AST/ASTContext.cpp

index dabc6f60dde80621442bf777cbe5a360e01b946e..a27f9b37d262abc56ea392656e11bbf8c5c46c10 100644 (file)
@@ -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);