[PATCH] D45978: dllexport const variables must have external linkage.

Zahira Ammarguellat via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 3 03:17:11 PST 2019


zahiraam added a comment.

In D45978#1379901 <https://reviews.llvm.org/D45978#1379901>, @rnk wrote:

> I'm still not sure this is the best place to make this change, but the functionality is important. There are still unaddressed comments (no need to check MSVCCompatibility, formatting), and I think once those are fixed we can land this.


Since it needs to fail for this:

__declspec(dllexport) const int j;

and pass for this:

__declspec(dllexport) int const x = 3;

I am proposing to add this code in Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit).


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

https://reviews.llvm.org/D45978





More information about the cfe-commits mailing list