[llvm-branch-commits] [cfe-branch] r156681 - in /cfe/branches/release_31: ./ lib/Serialization/ASTReader.cpp lib/Serialization/ASTWriter.cpp test/PCH/cxx11-exception-spec.cpp test/SemaCXX/warn-unreachable.cpp

Bill Wendling isanbard at gmail.com
Fri May 11 17:27:13 PDT 2012


Author: void
Date: Fri May 11 19:27:13 2012
New Revision: 156681

URL: http://llvm.org/viewvc/llvm-project?rev=156681&view=rev
Log:
Merging r155289:
------------------------------------------------------------------------
r155289 | rsmith | 2012-04-21 10:47:47 -0700 (Sat, 21 Apr 2012) | 3 lines

Fix serialization of uninstantiated exception specifications. Patch by Li Kan,
test by me.

------------------------------------------------------------------------

Added:
    cfe/branches/release_31/test/PCH/cxx11-exception-spec.cpp
      - copied unchanged from r155289, cfe/trunk/test/PCH/cxx11-exception-spec.cpp
Modified:
    cfe/branches/release_31/   (props changed)
    cfe/branches/release_31/lib/Serialization/ASTReader.cpp
    cfe/branches/release_31/lib/Serialization/ASTWriter.cpp
    cfe/branches/release_31/test/SemaCXX/warn-unreachable.cpp   (props changed)

Propchange: cfe/branches/release_31/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 11 19:27:13 2012
@@ -1,3 +1,3 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:155076,155278-155279,155342,155356,155424,155534-155535,155576,155608,155670,155728,155788,155803,155823,155860,155910,155975,156047,156322
+/cfe/trunk:155076,155278-155279,155289,155342,155356,155424,155534-155535,155576,155608,155670,155728,155788,155803,155823,155860,155910,155975,156047,156322
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_31/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/lib/Serialization/ASTReader.cpp?rev=156681&r1=156680&r2=156681&view=diff
==============================================================================
--- cfe/branches/release_31/lib/Serialization/ASTReader.cpp (original)
+++ cfe/branches/release_31/lib/Serialization/ASTReader.cpp Fri May 11 19:27:13 2012
@@ -3866,6 +3866,9 @@
       EPI.Exceptions = Exceptions.data();
     } else if (EST == EST_ComputedNoexcept) {
       EPI.NoexceptExpr = ReadExpr(*Loc.F);
+    } else if (EST == EST_Uninstantiated) {
+      EPI.ExceptionSpecDecl = ReadDeclAs<FunctionDecl>(*Loc.F, Record, Idx);
+      EPI.ExceptionSpecTemplate = ReadDeclAs<FunctionDecl>(*Loc.F, Record, Idx);
     }
     return Context.getFunctionType(ResultType, ParamTypes.data(), NumParams,
                                     EPI);

Modified: cfe/branches/release_31/lib/Serialization/ASTWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/lib/Serialization/ASTWriter.cpp?rev=156681&r1=156680&r2=156681&view=diff
==============================================================================
--- cfe/branches/release_31/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/branches/release_31/lib/Serialization/ASTWriter.cpp Fri May 11 19:27:13 2012
@@ -195,6 +195,9 @@
       Writer.AddTypeRef(T->getExceptionType(I), Record);
   } else if (T->getExceptionSpecType() == EST_ComputedNoexcept) {
     Writer.AddStmt(T->getNoexceptExpr());
+  } else if (T->getExceptionSpecType() == EST_Uninstantiated) {
+    Writer.AddDeclRef(T->getExceptionSpecDecl(), Record);
+    Writer.AddDeclRef(T->getExceptionSpecTemplate(), Record);
   }
   Code = TYPE_FUNCTION_PROTO;
 }

Propchange: cfe/branches/release_31/test/SemaCXX/warn-unreachable.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 11 19:27:13 2012
@@ -1,2 +1,2 @@
 /cfe/branches/type-system-rewrite/test/SemaCXX/warn-unreachable.cpp:134693-134817
-/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,155076,155278-155279,155342,155356,155424,155534-155535,155576,155608,155670,155728,155788,155803,155823,155860,155910,155975,156047
+/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,155076,155278-155279,155289,155342,155356,155424,155534-155535,155576,155608,155670,155728,155788,155803,155823,155860,155910,155975,156047





More information about the llvm-branch-commits mailing list