Sema: Explain our deviation from the standard by referencing the, now open, LWG issue.
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 21 Oct 2013 00:25:32 +0000 (00:25 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 21 Oct 2013 00:25:32 +0000 (00:25 +0000)
llvm-svn: 193062

clang/lib/Sema/SemaDecl.cpp

index 176fe8a1cf2c62ff13c6068ad2709f93be2730d2..e01c0324f8ccdc4eae12a61d40f3452cdddefcd5 100644 (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)