[llvm-branch-commits] [cfe-branch] r292859 - Merging r292847:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jan 23 16:14:31 PST 2017
Author: hans
Date: Mon Jan 23 18:14:31 2017
New Revision: 292859
URL: http://llvm.org/viewvc/llvm-project?rev=292859&view=rev
Log:
Merging r292847:
------------------------------------------------------------------------
r292847 | rsmith | 2017-01-23 15:14:23 -0800 (Mon, 23 Jan 2017) | 2 lines
PR31692: Don't mark a declaration as invalid if we haven't necessarily emitted a (user-visible) error.
------------------------------------------------------------------------
Added:
cfe/branches/release_40/test/SemaCXX/cxx11-default-member-initializers.cpp
- copied unchanged from r292847, cfe/trunk/test/SemaCXX/cxx11-default-member-initializers.cpp
Modified:
cfe/branches/release_40/ (props changed)
cfe/branches/release_40/lib/Sema/SemaDeclCXX.cpp
Propchange: cfe/branches/release_40/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 23 18:14:31 2017
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:291850,291853,291865,291871,291877,291879,291881,291907,291955,291964,292032,292052,292183,292247,292265,292497,292555,292558-292559,292800
+/cfe/trunk:291850,291853,291865,291871,291877,291879,291881,291907,291955,291964,292032,292052,292183,292247,292265,292497,292555,292558-292559,292800,292847
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_40/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/lib/Sema/SemaDeclCXX.cpp?rev=292859&r1=292858&r2=292859&view=diff
==============================================================================
--- cfe/branches/release_40/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/branches/release_40/lib/Sema/SemaDeclCXX.cpp Mon Jan 23 18:14:31 2017
@@ -12383,9 +12383,9 @@ ExprResult Sema::BuildCXXDefaultInitExpr
Diag(Loc, diag::err_in_class_initializer_not_yet_parsed)
<< OutermostClass << Field;
Diag(Field->getLocEnd(), diag::note_in_class_initializer_not_yet_parsed);
-
- // Don't diagnose this again.
- Field->setInvalidDecl();
+ // Recover by marking the field invalid, unless we're in a SFINAE context.
+ if (!isSFINAEContext())
+ Field->setInvalidDecl();
return ExprError();
}
More information about the llvm-branch-commits
mailing list