[PATCH] D45978: dllexport const variables must have external linkage.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 4 06:13:46 PST 2019
aaron.ballman added a comment.
In D45978#1382292 <https://reviews.llvm.org/D45978#1382292>, @zahiraam wrote:
> 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).
That seems like a reasonable place to try, to me.
CHANGES SINCE LAST ACTION
More information about the cfe-commits