forked from OSchip/llvm-project
Sema: Explain our deviation from the standard by referencing the, now open, LWG issue.
llvm-svn: 193062
This commit is contained in:
parent
e29296e48c
commit
2b2512141f
|
@ -6807,6 +6807,8 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
|
||||||
|
|
||||||
// C++11 [replacement.functions]p3:
|
// C++11 [replacement.functions]p3:
|
||||||
// The program's definitions shall not be specified as inline.
|
// 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())
|
if (isInline && NewFD->isReplaceableGlobalAllocationFunction())
|
||||||
Diag(D.getDeclSpec().getInlineSpecLoc(),
|
Diag(D.getDeclSpec().getInlineSpecLoc(),
|
||||||
diag::err_operator_new_delete_declared_inline)
|
diag::err_operator_new_delete_declared_inline)
|
||||||
|
|
Loading…
Reference in New Issue