grimar updated this revision to Diff 36271.
grimar added a comment.

Added comment per review request.


http://reviews.llvm.org/D13203

Files:
  ASTContext.cpp

Index: ASTContext.cpp
===================================================================
--- ASTContext.cpp
+++ ASTContext.cpp
@@ -364,14 +364,19 @@
     } else {
       RC = getRawCommentForDeclNoCache(I);
       OriginalDeclForRC = I;
-      RawCommentAndCacheFlags Raw;
+      // TODO: these next two lines helps to workaround msvs 2015
+      // internal compiler error. This is a replacement
+      // of delayed assignment RedeclComments[I] = Raw
+      // which caused that issue.
+      RedeclComments[I] = RawCommentAndCacheFlags();
+      RawCommentAndCacheFlags &Raw = RedeclComments[I];
+      //
       if (RC) {
         Raw.setRaw(RC);
         Raw.setKind(RawCommentAndCacheFlags::FromDecl);
       } else
         Raw.setKind(RawCommentAndCacheFlags::NoCommentInDecl);
       Raw.setOriginalDecl(I);
-      RedeclComments[I] = Raw;
       if (RC)
         break;
     }


Index: ASTContext.cpp
===================================================================
--- ASTContext.cpp
+++ ASTContext.cpp
@@ -364,14 +364,19 @@
     } else {
       RC = getRawCommentForDeclNoCache(I);
       OriginalDeclForRC = I;
-      RawCommentAndCacheFlags Raw;
+      // TODO: these next two lines helps to workaround msvs 2015
+      // internal compiler error. This is a replacement
+      // of delayed assignment RedeclComments[I] = Raw
+      // which caused that issue.
+      RedeclComments[I] = RawCommentAndCacheFlags();
+      RawCommentAndCacheFlags &Raw = RedeclComments[I];
+      //
       if (RC) {
         Raw.setRaw(RC);
         Raw.setKind(RawCommentAndCacheFlags::FromDecl);
       } else
         Raw.setKind(RawCommentAndCacheFlags::NoCommentInDecl);
       Raw.setOriginalDecl(I);
-      RedeclComments[I] = Raw;
       if (RC)
         break;
     }
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to