]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
d: Consistently format quotations in comments.
authorIain Buclaw <ibuclaw@gdcproject.org>
Tue, 16 Jun 2020 13:57:58 +0000 (15:57 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Tue, 16 Jun 2020 21:37:55 +0000 (23:37 +0200)
gcc/d/ChangeLog:

* d-builtins.cc: Update quotation formatting of comments.
* d-codegen.cc: Likewise.
* d-lang.cc: Likewise.
* decl.cc: Likewise.
* expr.cc: Likewise.
* imports.cc: Likewise.
* runtime.cc: Likewise.
* toir.cc: Likewise.
* typeinfo.cc: Likewise.
* types.cc: Likewise.

gcc/d/d-builtins.cc
gcc/d/d-codegen.cc
gcc/d/d-lang.cc
gcc/d/decl.cc
gcc/d/expr.cc
gcc/d/imports.cc
gcc/d/runtime.cc
gcc/d/toir.cc
gcc/d/typeinfo.cc
gcc/d/types.cc

index f1bdcb9fafd60af800d2a0732dae083ce682aef7..75eaa6b8a730bbe39d59ec23c7e38b8b5f816a76 100644 (file)
@@ -222,7 +222,7 @@ build_frontend_type (tree type)
        Identifier::idPool (IDENTIFIER_POINTER (TYPE_IDENTIFIER (type))) : NULL;
 
       /* Neither the `object' and `gcc.builtins' modules will not exist when
-        this is called.  Use a stub 'object' module parent in the meantime.
+        this is called.  Use a stub `object' module parent in the meantime.
         If `gcc.builtins' is later imported, the parent will be overridden
         with the correct module symbol.  */
       static Identifier *object = Identifier::idPool ("object");
index 9d13e1263a995cc3e597dd432d55002889af6618..b82e16fe79efcdd558e2eb3e816b1c7a53e2f5ed 100644 (file)
@@ -82,7 +82,7 @@ d_decl_context (Dsymbol *dsym)
          return build_import_decl (parent);
        }
 
-      /* Declarations marked as 'static' or '__gshared' are never
+      /* Declarations marked as `static' or `__gshared' are never
         part of any context except at module level.  */
       if (decl != NULL && decl->isDataseg ())
        continue;
@@ -164,7 +164,7 @@ declaration_type (Declaration *decl)
   if (declaration_reference_p (decl))
     return build_reference_type (type);
 
-  /* The 'this' parameter is always const.  */
+  /* The `this' parameter is always const.  */
   if (decl->isThisDeclaration ())
     return insert_type_modifiers (type, MODconst);
 
@@ -1830,7 +1830,7 @@ call_by_alias_p (FuncDeclaration *caller, FuncDeclaration *callee)
 }
 
 /* Entry point for call routines.  Builds a function call to FD.
-   OBJECT is the 'this' reference passed and ARGS are the arguments to FD.  */
+   OBJECT is the `this' reference passed and ARGS are the arguments to FD.  */
 
 tree
 d_build_call_expr (FuncDeclaration *fd, tree object, Expressions *arguments)
@@ -1839,7 +1839,7 @@ d_build_call_expr (FuncDeclaration *fd, tree object, Expressions *arguments)
                       build_address (get_symbol_decl (fd)), object, arguments);
 }
 
-/* Builds a CALL_EXPR of type TF to CALLABLE.  OBJECT holds the 'this' pointer,
+/* Builds a CALL_EXPR of type TF to CALLABLE.  OBJECT holds the `this' pointer,
    ARGUMENTS are evaluated in left to right order, saved and promoted
    before passing.  */
 
@@ -2044,7 +2044,7 @@ build_float_modulus (tree type, tree arg0, tree arg1)
 }
 
 /* Build a function type whose first argument is a pointer to BASETYPE,
-   which is to be used for the 'vthis' context parameter for TYPE.
+   which is to be used for the `vthis' context parameter for TYPE.
    The base type may be a record for member functions, or a void for
    nested functions and delegates.  */
 
@@ -2085,7 +2085,7 @@ get_frame_for_symbol (Dsymbol *sym)
       /* Check that the nested function is properly defined.  */
       if (!fd->fbody)
        {
-         /* Should instead error on line that references 'fd'.  */
+         /* Should instead error on line that references `fd'.  */
          error_at (make_location_t (fd->loc), "nested function missing body");
          return null_pointer_node;
        }
@@ -2181,7 +2181,7 @@ get_frame_for_symbol (Dsymbol *sym)
     {
       tree frame_ref = get_framedecl (thisfd, fdparent);
 
-      /* If 'thisfd' is a derived member function, then 'fdparent' is the
+      /* If `thisfd' is a derived member function, then `fdparent' is the
         overridden member function in the base class.  Even if there's a
         closure environment, we should give the original stack data as the
         nested function frame.  */
@@ -2195,12 +2195,12 @@ get_frame_for_symbol (Dsymbol *sym)
          if (cdo->isBaseOf (cd, &offset) && offset != 0)
            {
              /* Generate a new frame to pass to the overriden function that
-                has the 'this' pointer adjusted.  */
+                has the `this' pointer adjusted.  */
              gcc_assert (offset != OFFSET_RUNTIME);
 
              tree type = FRAMEINFO_TYPE (get_frameinfo (fdoverride));
              tree fields = TYPE_FIELDS (type);
-             /* The 'this' field comes immediately after the '__chain'.  */
+             /* The `this' field comes immediately after the `__chain'.  */
              tree thisfield = chain_index (1, fields);
              vec<constructor_elt, va_gc> *ve = NULL;
 
@@ -2263,7 +2263,7 @@ d_nested_struct (StructDeclaration *sd)
 
 
 /* Starting from the current function FD, try to find a suitable value of
-   'this' in nested function instances.  A suitable 'this' value is an
+   `this' in nested function instances.  A suitable `this' value is an
    instance of OCD or a class that has OCD as a base.  */
 
 static tree
@@ -2301,7 +2301,7 @@ find_this_tree (ClassDeclaration *ocd)
   return NULL_TREE;
 }
 
-/* Retrieve the outer class/struct 'this' value of DECL from
+/* Retrieve the outer class/struct `this' value of DECL from
    the current function.  */
 
 tree
@@ -2327,7 +2327,7 @@ build_vthis (AggregateDeclaration *decl)
          outer = ((TemplateInstance *) outer->parent)->enclosing;
        }
 
-      /* For outer classes, get a suitable 'this' value.
+      /* For outer classes, get a suitable `this' value.
         For outer functions, get a suitable frame/closure pointer.  */
       ClassDeclaration *cdo = outer->isClassDeclaration ();
       FuncDeclaration *fdo = outer->isFuncDeclaration ();
@@ -2412,7 +2412,7 @@ build_frame_type (tree ffi, FuncDeclaration *fd)
            }
        }
 
-      /* Also add hidden 'this' to outer context.  */
+      /* Also add hidden `this' to outer context.  */
       if (fd->vthis)
        {
          for (size_t i = 0; i < fd->closureVars.length; i++)
@@ -2542,7 +2542,7 @@ build_closure (FuncDeclaration *fd)
 }
 
 /* Return the frame of FD.  This could be a static chain or a closure
-   passed via the hidden 'this' pointer.  */
+   passed via the hidden `this' pointer.  */
 
 tree
 get_frameinfo (FuncDeclaration *fd)
index 34fbc5f41d8a73d2b3ab6db54cd3922237047601..dd5a83cb4fe473a40f2b185d9fa94843c92d16e2 100644 (file)
@@ -337,7 +337,7 @@ d_init_options_struct (gcc_options *opts)
   /* Avoid range issues for complex multiply and divide.  */
   opts->x_flag_complex_method = 2;
 
-  /* Unlike C, there is no global 'errno' variable.  */
+  /* Unlike C, there is no global `errno' variable.  */
   opts->x_flag_errno_math = 0;
   opts->frontend_set_flag_errno_math = true;
 
index 28d1d6d5f31dfafb9c931ae3c7294fd3dd59de11..f43b334aac79af2245bdca3d5d41d7c97db95b8b 100644 (file)
@@ -859,7 +859,7 @@ public:
 
     /* Special arguments...  */
 
-    /* 'this' parameter:
+    /* `this' parameter:
        For nested functions, D still generates a vthis, but it
        should not be referenced in any expression.  */
     if (d->vthis)
@@ -1205,7 +1205,7 @@ get_symbol_decl (Declaration *decl)
        }
       else if (fd->isThis ())
        {
-         /* Add an extra argument for the 'this' parameter.  The handle type is
+         /* Add an extra argument for the `this' parameter.  The handle type is
             used even if there is no debug info.  It is needed to make sure
             virtual member functions are not called statically.  */
          AggregateDeclaration *ad = fd->isMember2 ();
@@ -1226,11 +1226,11 @@ get_symbol_decl (Declaration *decl)
        }
       else if (fd->isMain () || fd->isCMain ())
        {
-         /* The main function is named 'D main' to distinguish from C main.  */
+         /* The main function is named `D main' to distinguish from C main.  */
          if (fd->isMain ())
            DECL_NAME (decl->csym) = get_identifier (fd->toPrettyChars (true));
 
-         /* 'void main' is implicitly converted to returning an int.  */
+         /* `void main' is implicitly converted to returning an int.  */
          newfntype = build_function_type (d_int_type, TYPE_ARG_TYPES (fntype));
        }
 
@@ -1253,14 +1253,14 @@ get_symbol_decl (Declaration *decl)
          DECL_NO_INLINE_WARNING_P (decl->csym) = 1;
        }
 
-      /* In [pragma/inline], functions decorated with 'pragma(inline)' affects
+      /* In [pragma/inline], functions decorated with `pragma(inline)' affects
         whether they are inlined or not.  */
       if (fd->inlining == PINLINEalways)
        DECL_DECLARED_INLINE_P (decl->csym) = 1;
       else if (fd->inlining == PINLINEnever)
        DECL_UNINLINABLE (decl->csym) = 1;
 
-      /* Function was declared 'naked'.  */
+      /* Function was declared `naked'.  */
       if (fd->naked)
        {
          insert_decl_attribute (decl->csym, "naked");
@@ -1466,7 +1466,7 @@ get_decl_tree (Declaration *decl)
                            DECL_LANG_FRAME_FIELD (t));
     }
 
-  /* Get the non-local 'this' value by going through parent link
+  /* Get the non-local `this' value by going through parent link
      of nested classes, this routine pretty much undoes what
      getRightThis in the frontend removes from codegen.  */
   if (vd->parent != fd && vd->isThisDeclaration ())
@@ -1501,9 +1501,9 @@ get_decl_tree (Declaration *decl)
          fd = outer->isFuncDeclaration ();
          while (fd != NULL)
            {
-             /* If outer function creates a closure, then the 'this'
+             /* If outer function creates a closure, then the `this'
                 value would be the closure pointer, and the real
-                'this' the first field of that closure.  */
+                `this' the first field of that closure.  */
              tree ff = get_frameinfo (fd);
              if (FRAMEINFO_CREATES_FRAME (ff))
                {
@@ -1900,7 +1900,7 @@ start_function (FuncDeclaration *fd)
   cfun->language = ggc_cleared_alloc<language_function> ();
   cfun->language->function = fd;
 
-  /* Default chain value is 'null' unless parent found.  */
+  /* Default chain value is `null' unless parent found.  */
   cfun->language->static_chain = null_pointer_node;
 
   /* Find module for this function.  */
@@ -2194,7 +2194,7 @@ build_new_class_expr (ClassReferenceExp *expr)
 
 /* Get the VAR_DECL of the static initializer symbol for the struct/class DECL.
    If this does not yet exist, create it.  The static initializer data is
-   accessible via TypeInfo, and is also used in 'new class' and default
+   accessible via TypeInfo, and is also used in `new class' and default
    initializing struct literals.  */
 
 tree
index bf9bb45690ad205f16bf7f19d1ad08f1d215a562..e1842cc6feec39c3bffb1d56fa38f7c076bfbd84 100644 (file)
@@ -1739,7 +1739,7 @@ public:
                    thisexp = TREE_OPERAND (thisexp, 1);
                  }
 
-               /* Want reference to 'this' object.  */
+               /* Want reference to `this' object.  */
                if (!POINTER_TYPE_P (TREE_TYPE (thisexp)))
                  thisexp = build_address (thisexp);
 
@@ -1770,7 +1770,7 @@ public:
          {
            /* This gets the true function type, getting the function type
               from e1->type can sometimes be incorrect, such as when calling
-              a 'ref' return function.  */
+              a `ref' return function.  */
            tf = get_function_type (e1b->isDotVarExp ()->var->type);
          }
        else
@@ -1794,7 +1794,7 @@ public:
 
        if (fd->isNested ())
          {
-           /* Maybe re-evaluate symbol storage treating 'fd' as public.  */
+           /* Maybe re-evaluate symbol storage treating `fd' as public.  */
            if (call_by_alias_p (d_function_chain->function, fd))
              TREE_PUBLIC (callee) = 1;
 
@@ -2099,7 +2099,7 @@ public:
   {
     Type *ftype = e->type->toBasetype ();
 
-    /* This check is for lambda's, remove 'vthis' as function isn't nested.  */
+    /* This check is for lambda's, remove `vthis' as function isn't nested.  */
     if (e->fd->tok == TOKreserved && ftype->ty == Tpointer)
       {
        e->fd->tok = TOKfunction;
index e6e696ab325c09448e146b721e7ec70fd745d269..34cd5e1fdd293d438707f5033e4da22dc53b97a2 100644 (file)
@@ -202,7 +202,7 @@ build_import_decl (Dsymbol *d)
       input_location = saved_location;
     }
 
-  /* Not all visitors set 'isym'.  */
+  /* Not all visitors set `isym'.  */
   return d->isym ? d->isym : NULL_TREE;
 }
 
index ab1c04db4de5b7c56f8921d4cbc9c01b7a28845f..b4426e150ba5a041f04a4a84591031c8a82fe2ce 100644 (file)
@@ -219,7 +219,7 @@ build_libcall_decl (const char *name, d_libcall_type return_type,
   bool varargs = false;
   tree fntype;
 
-  /* Add parameter types, using 'void' as the last parameter type
+  /* Add parameter types, using `void' as the last parameter type
      to mean this function accepts a variable list of arguments.  */
   va_list ap;
   va_start (ap, nparams);
index 130cbbafe00bd31b4931a3302e58cae17f3ae64b..b6f72092e5f50e4d3c542ad19d682e4a60752666 100644 (file)
@@ -564,14 +564,14 @@ public:
   {
     this->start_scope (level_cond);
 
-    /* Build the outer 'if' condition, which may produce temporaries
+    /* Build the outer `if' condition, which may produce temporaries
        requiring scope destruction.  */
     tree ifcond = convert_for_condition (build_expr_dtor (s->condition),
                                         s->condition->type);
     tree ifbody = void_node;
     tree elsebody = void_node;
 
-    /* Build the 'then' branch.  */
+    /* Build the `then' branch.  */
     if (s->ifbody)
       {
        push_stmt_list ();
@@ -579,7 +579,7 @@ public:
        ifbody = pop_stmt_list ();
       }
 
-    /* Now build the 'else' branch, which may have nested 'else if' parts.  */
+    /* Now build the `else' branch, which may have nested `else if' parts.  */
     if (s->elsebody)
       {
        push_stmt_list ();
@@ -627,7 +627,7 @@ public:
        this->pop_continue_label (lcontinue);
       }
 
-    /* Build the outer 'while' condition, which may produce temporaries
+    /* Build the outer `while' condition, which may produce temporaries
        requiring scope destruction.  */
     tree exitcond = convert_for_condition (build_expr_dtor (s->condition),
                                           s->condition->type);
@@ -885,7 +885,7 @@ public:
          {
            tree defaultlabel = this->lookup_label (s->sdefault);
 
-           /* The default label is the last 'else' block.  */
+           /* The default label is the last `else' block.  */
            if (s->hasVars)
              {
                this->do_jump (defaultlabel);
@@ -917,7 +917,7 @@ public:
 
     SWITCH_BREAK_LABEL_P (lbreak) = 1;
 
-    /* If the switch had any 'break' statements, emit the label now.  */
+    /* If the switch had any `break' statements, emit the label now.  */
     this->pop_break_label (lbreak);
     this->finish_scope ();
   }
@@ -968,7 +968,7 @@ public:
       this->build_stmt (s->statement);
   }
 
-  /* Implements 'goto default' by jumping to the label associated with
+  /* Implements `goto default' by jumping to the label associated with
      the DefaultStatement in a switch block.  */
 
   void visit (GotoDefaultStatement *s)
@@ -977,7 +977,7 @@ public:
     this->do_jump (label);
   }
 
-  /* Implements 'goto case' by jumping to the label associated with the
+  /* Implements `goto case' by jumping to the label associated with the
      CaseStatement in a switch block.  */
 
   void visit (GotoCaseStatement *s)
@@ -1112,7 +1112,7 @@ public:
 
     if (s->wthis)
       {
-       /* Perform initialisation of the 'with' handle.  */
+       /* Perform initialisation of the `with' handle.  */
        ExpInitializer *ie = s->wthis->_init->isExpInitializer ();
        gcc_assert (ie != NULL);
 
@@ -1127,7 +1127,7 @@ public:
     this->finish_scope ();
   }
 
-  /* Implements 'throw Object'.  Frontend already checks that the object
+  /* Implements `throw Object'.  Frontend already checks that the object
      thrown is a class type, but does not check if it is derived from
      Object.  Foreign objects are not currently supported at run-time.  */
 
@@ -1432,7 +1432,7 @@ public:
        optimization, this could be unset when building in release mode.  */
     ASM_VOLATILE_P (exp) = 1;
 
-    /* If the function has been annotated with 'pragma(inline)', then mark
+    /* If the function has been annotated with `pragma(inline)', then mark
        the asm expression as being inline as well.  */
     if (this->func_->inlining == PINLINEalways)
       ASM_INLINE_P (exp) = 1;
index f3051d3e122c5b8fe14a6ccc08db803ce1069e6b..b03019bdff567e9931d56afea1e3cea6c1c499e6 100644 (file)
@@ -456,7 +456,7 @@ class TypeInfoVisitor : public Visitor
            CONSTRUCTOR_APPEND_ELT (v, size_int (2), value);
          }
 
-       /* The 'this' offset.  */
+       /* The `this' offset.  */
        CONSTRUCTOR_APPEND_ELT (v, size_int (3), size_int (b->offset));
 
        /* Add to the array of interfaces.  */
@@ -1483,7 +1483,7 @@ create_typeinfo (Type *type, Module *mod)
          /* Kinds of TypeInfo that add one extra pointer field.  */
          if (tk == TK_SHARED_TYPE)
            {
-             /* Does both 'shared' and 'shared const'.  */
+             /* Does both `shared' and `shared const'.  */
              t->vtinfo = TypeInfoSharedDeclaration::create (t);
              ident = Identifier::idPool ("TypeInfo_Shared");
            }
index ba7e29a12e1e73339632294c15587c279fd5fad5..b8984a50ff05bad9c512b8760483831264c65fe1 100644 (file)
@@ -106,7 +106,7 @@ same_type_p (Type *t1, Type *t2)
   return false;
 }
 
-/* Returns 'Object' type which all D classes are derived from.  */
+/* Returns `Object' type which all D classes are derived from.  */
 
 Type *
 get_object_type (void)
@@ -204,7 +204,7 @@ insert_type_modifiers (tree type, unsigned mod)
 
   tree qualtype = build_qualified_type (type, quals);
 
-  /* Mark whether the type is qualified 'shared'.  */
+  /* Mark whether the type is qualified `shared'.  */
   if (mod & MODshared)
     TYPE_SHARED (qualtype) = 1;