[PATCH] D69935: [DeclCXX] Remove unknown external linkage specifications

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 7 14:27:12 PST 2019


dblaikie added a comment.

In D69935#1737615 <https://reviews.llvm.org/D69935#1737615>, @ekatz wrote:

> With this change (current trunk) you can write code as follows:
>
>   extern "C++11" int x;
>
>
> And it will pass compilation. No other compiler support it, nor it should, as there is no such thing as `extern "C++11"` nor `extern "C++14"`.


Ah, thanks - fair enough. This should probably include a test case to demonstrate that? (though I suppose it's sort of hard to imagine why such a test case would be useful but for this particular bug & adding a test case would only cover one possible spelling here)

Are all the changes proposed here necessary to fix that bug?

But yeah, in general, it looks like these constants really aren't suitable for C++11/14 data at all. They're about C V C++ linkage/mangling/etc & just happened to use the DWARF constants for some reason (mentioned in the comment above, though I don't find it super compelling).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69935/new/

https://reviews.llvm.org/D69935





More information about the cfe-commits mailing list