[PATCH] D26143: [modules] Mark deleted functions as implicitly inline to allow merging
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 31 16:15:43 PDT 2016
EricWF updated this revision to Diff 76501.
https://reviews.llvm.org/D26143
Files:
lib/Sema/SemaDeclCXX.cpp
test/Modules/Inputs/merge-decl-context/a.h
Index: test/Modules/Inputs/merge-decl-context/a.h
===================================================================
--- test/Modules/Inputs/merge-decl-context/a.h
+++ test/Modules/Inputs/merge-decl-context/a.h
@@ -24,5 +24,6 @@
struct Aggregate {
int member;
};
+bool operator==(Aggregate, Aggregate) = delete;
#endif
Index: lib/Sema/SemaDeclCXX.cpp
===================================================================
--- lib/Sema/SemaDeclCXX.cpp
+++ lib/Sema/SemaDeclCXX.cpp
@@ -13870,6 +13870,9 @@
if (Fn->isMain())
Diag(DelLoc, diag::err_deleted_main);
+ // C++11 [dcl.fct.def.delete]p4:
+ // A deleted function is implicitly inline.
+ Fn->setImplicitlyInline();
Fn->setDeletedAsWritten();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26143.76501.patch
Type: text/x-patch
Size: 725 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161031/4b6124c7/attachment.bin>
More information about the cfe-commits
mailing list