[llvm-branch-commits] [cfe-branch] r156678 - in /cfe/branches/release_31: ./ include/clang/Sema/Initialization.h test/SemaCXX/cxx0x-initializer-references.cpp test/SemaCXX/warn-unreachable.cpp
Bill Wendling
isanbard at gmail.com
Fri May 11 17:26:07 PDT 2012
Author: void
Date: Fri May 11 19:26:07 2012
New Revision: 156678
URL: http://llvm.org/viewvc/llvm-project?rev=156678&view=rev
Log:
Merging r155608:
------------------------------------------------------------------------
r155608 | rsmith | 2012-04-25 20:16:45 -0700 (Wed, 25 Apr 2012) | 3 lines
PR12660: Don't crash when initializing a const reference from a braced init list
which creates a temporary by calling a constructor.
------------------------------------------------------------------------
Modified:
cfe/branches/release_31/ (props changed)
cfe/branches/release_31/include/clang/Sema/Initialization.h
cfe/branches/release_31/test/SemaCXX/cxx0x-initializer-references.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:26:07 2012
@@ -1,3 +1,3 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:155076,155278-155279,155342,155356,155534-155535,155576,155670,155728,155788,155803,155823,155860,155910,155975,156047,156322
+/cfe/trunk:155076,155278-155279,155342,155356,155534-155535,155576,155608,155670,155728,155788,155803,155823,155860,155910,155975,156047,156322
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_31/include/clang/Sema/Initialization.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/include/clang/Sema/Initialization.h?rev=156678&r1=156677&r2=156678&view=diff
==============================================================================
--- cfe/branches/release_31/include/clang/Sema/Initialization.h (original)
+++ cfe/branches/release_31/include/clang/Sema/Initialization.h Fri May 11 19:26:07 2012
@@ -225,7 +225,9 @@
/// \brief Create the initialization entity for a temporary.
static InitializedEntity InitializeTemporary(QualType Type) {
- return InitializedEntity(EK_Temporary, SourceLocation(), Type);
+ InitializedEntity Result(EK_Temporary, SourceLocation(), Type);
+ Result.TypeInfo = 0;
+ return Result;
}
/// \brief Create the initialization entity for a temporary.
Modified: cfe/branches/release_31/test/SemaCXX/cxx0x-initializer-references.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/test/SemaCXX/cxx0x-initializer-references.cpp?rev=156678&r1=156677&r2=156678&view=diff
==============================================================================
--- cfe/branches/release_31/test/SemaCXX/cxx0x-initializer-references.cpp (original)
+++ cfe/branches/release_31/test/SemaCXX/cxx0x-initializer-references.cpp Fri May 11 19:26:07 2012
@@ -85,3 +85,8 @@
f({1, 2});
}
}
+
+namespace PR12660 {
+ const int &i { 1 };
+ struct S { S(int); } const &s { 2 };
+}
Propchange: cfe/branches/release_31/test/SemaCXX/warn-unreachable.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 11 19:26:07 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,155534-155535,155576,155670,155728,155788,155803,155823,155860,155910,155975,156047
+/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,155076,155278-155279,155342,155356,155534-155535,155576,155608,155670,155728,155788,155803,155823,155860,155910,155975,156047
More information about the llvm-branch-commits
mailing list