[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:16:55 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL285655: [modules] Mark deleted functions as implicitly inline to allow merging (authored by EricWF).
Changed prior to commit:
https://reviews.llvm.org/D26143?vs=76501&id=76502#toc
https://reviews.llvm.org/D26143
Files:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/test/Modules/Inputs/merge-decl-context/a.h
Index: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
===================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp
@@ -13875,6 +13875,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();
}
Index: cfe/trunk/test/Modules/Inputs/merge-decl-context/a.h
===================================================================
--- cfe/trunk/test/Modules/Inputs/merge-decl-context/a.h
+++ cfe/trunk/test/Modules/Inputs/merge-decl-context/a.h
@@ -24,5 +24,6 @@
struct Aggregate {
int member;
};
+bool operator==(Aggregate, Aggregate) = delete;
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26143.76502.patch
Type: text/x-patch
Size: 785 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161031/a3edbe7b/attachment.bin>
More information about the cfe-commits
mailing list