diff mbox

[C++] PR 30066

Message ID 4EAA112A.9050804@redhat.com
State New
Headers show

Commit Message

Jason Merrill Oct. 28, 2011, 2:19 a.m. UTC
I made a few formatting tweaks as follows, and checked in the patch. 
Thanks!

Jason
diff mbox

Patch

commit 3e01e07381cdb16727fe67777011202372ebcdfc
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Oct 27 17:44:39 2011 -0400

    cleanup

diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 1e514af..be9044b 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -2178,7 +2178,8 @@  determine_visibility (tree decl)
 
 	  if (!DECL_VISIBILITY_SPECIFIED (decl))
 	    {
-	      if (!DECL_VISIBILITY_SPECIFIED (pattern) && determine_hidden_inline (decl))
+	      if (!DECL_VISIBILITY_SPECIFIED (pattern)
+		  && determine_hidden_inline (decl))
 		DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
 	      else
 		{
@@ -2265,18 +2266,21 @@  determine_visibility_from_class (tree decl, tree class_type)
     targetm.cxx.determine_class_data_visibility (decl);
 }
 
+/* Returns true iff DECL is an inline that should get hidden visibility
+   because of -fvisibility-inlines-hidden.  */
+
 static bool
 determine_hidden_inline (tree decl)
 {
   return (visibility_options.inlines_hidden
-      /* Don't do this for inline templates; specializations might not be
-       * inline, and we don't want them to inherit the hidden
-       * visibility.  We'll set it here for all inline instantiations.  */
-      && !processing_template_decl
-      && TREE_CODE (decl) == FUNCTION_DECL
-      && DECL_DECLARED_INLINE_P (decl)
-      && (! DECL_LANG_SPECIFIC (decl)
-          || ! DECL_EXPLICIT_INSTANTIATION (decl)));
+	  /* Don't do this for inline templates; specializations might not be
+	     inline, and we don't want them to inherit the hidden
+	     visibility.  We'll set it here for all inline instantiations.  */
+	  && !processing_template_decl
+	  && TREE_CODE (decl) == FUNCTION_DECL
+	  && DECL_DECLARED_INLINE_P (decl)
+	  && (! DECL_LANG_SPECIFIC (decl)
+	      || ! DECL_EXPLICIT_INSTANTIATION (decl)));
 }
 
 /* Constrain the visibility of a class TYPE based on the visibility of its