]> granicus.if.org Git - clang/commitdiff
Doug's review comments.
authorSebastian Redl <sebastian.redl@getdesigned.at>
Wed, 22 Feb 2012 17:38:04 +0000 (17:38 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Wed, 22 Feb 2012 17:38:04 +0000 (17:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151173 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaStmt.cpp
test/SemaCXX/cxx0x-return-init-list.cpp

index a2dda0201ba3a5277b44bac7b1b504c339877ef5..cad6d674bf80c9d1a968c54ee07066a3c5f5337b 100644 (file)
@@ -1878,7 +1878,7 @@ Sema::ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) {
     // Delay processing for now.  TODO: there are lots of dependent
     // types we can conclusively prove aren't void.
   } else if (FnRetType->isVoidType()) {
-    if (RetValExp &&
+    if (RetValExp && !isa<InitListExpr>(RetValExp) &&
         !(getLangOptions().CPlusPlus &&
           (RetValExp->isTypeDependent() ||
            RetValExp->getType()->isVoidType()))) {
index b2cb3d37ce7750711aa4e2565bfee8bfadfe2ee3..da83271c4d7ec3047de05decbc8c64709f79d5fb 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -fsyntax-only -verify %s
 
 // Test that a very basic variation of generalized initializer returns (that
-// required for libstdc++ 4.5) is supposed in C++98.
+// required for libstdc++ 4.5) is supported in C++98.
 
 int test0(int i) {
   return { i }; // expected-warning{{generalized initializer lists are a C++11 extension}}