From: David Majnemer Date: Mon, 21 Oct 2013 00:25:32 +0000 (+0000) Subject: Sema: Explain our deviation from the standard by referencing the, now open, LWG issue. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3abf5f6104bc0d668348a2c3e744f05853b5d79f;p=clang Sema: Explain our deviation from the standard by referencing the, now open, LWG issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193062 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 176fe8a1cf..e01c0324f8 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -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)