================
Comment at: lib/AST/Decl.cpp:669-674
@@ -668,3 +668,8 @@
       if (computation == LVForValue) {
-        globalVisibility = Context.getLangOpts().getValueVisibilityMode();
+        const FunctionDecl *FD = D->getAsFunction();
+        if (FD && FD->getCorrespondingUnsizedGlobalDeallocationFunction())
+          // C++14's implicit sized deallocation functions always have default 
visibility.
+          globalVisibility = DefaultVisibility;
+        else
+          globalVisibility = Context.getLangOpts().getValueVisibilityMode();
       } else {
----------------
I would prefer to handle this by adding a visibility(default) attribute to all 
implicitly-declared allocation functions in 
`Sema::DeclareGlobalAllocationFunction`.

http://reviews.llvm.org/D7392

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to