Sema: Explain our deviation from the standard by referencing the, now open, LWG issue.

llvm-svn: 193062
This commit is contained in:
David Majnemer 2013-10-21 00:25:32 +00:00
parent e29296e48c
commit 2b2512141f
1 changed files with 2 additions and 0 deletions

View File

@ -6807,6 +6807,8 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
// C++11 [replacement.functions]p3:
// The program's definitions shall not be specified as inline.
//
// N.B. We diagnose declarations instead of definitions per LWG issue 2340.
if (isInline && NewFD->isReplaceableGlobalAllocationFunction())
Diag(D.getDeclSpec().getInlineSpecLoc(),
diag::err_operator_new_delete_declared_inline)