[PATCH] D26189: Add a note that points to the linkage specifier for the "must have C++ linkage" errors

Alex Lorenz via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 1 07:04:45 PDT 2016


arphaman created this revision.
arphaman added reviewers: rsmith, rjmccall.
arphaman added a subscriber: cfe-commits.
arphaman set the repository for this revision to rL LLVM.

This patch improves the "must have C++ linkage" error diagnostics for C++ by adding an additional note that points to the appropriate `extern "C"` linkage specifier. This patch covers the diagnostics for templates and literal operators, which AFAIK are the only declarations that emit this particular kind of error. Please let me know if you think there are errors for other C++ declarations that require similar changes.


Repository:
  rL LLVM

https://reviews.llvm.org/D26189

Files:
  include/clang/AST/DeclBase.h
  lib/AST/DeclBase.cpp
  lib/Sema/SemaDeclCXX.cpp
  lib/Sema/SemaTemplate.cpp
  test/CXX/over/over.oper/over.literal/p6.cpp
  test/SemaCXX/cxx0x-defaulted-functions.cpp
  test/SemaTemplate/class-template-decl.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26189.76544.patch
Type: text/x-patch
Size: 5375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161101/c097d5bd/attachment.bin>


More information about the cfe-commits mailing list