[PATCH] Inherit dll attributes to static locals
Reid Kleckner
rnk at google.com
Tue Jun 17 17:50:45 PDT 2014
================
Comment at: lib/Sema/SemaDecl.cpp:9108
@@ -9107,1 +9107,3 @@
+ // Static locals inherit dll attributes from their function.
+ if (VD->isStaticLocal()) {
----------------
Should this go before checkAttributesAfterMerging? Consider this obnoxious test case:
int f();
inline __declspec(dllexport) int g() {
static __declspec(dllimport) int x = f();
return x;
}
http://reviews.llvm.org/D4136
More information about the cfe-commits
mailing list