From patchwork Thu Aug 30 15:15:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 963971 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-484805-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BxilgEcL"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 421Qzx60bgz9rvt for ; Fri, 31 Aug 2018 01:15:54 +1000 (AEST) Received: (qmail 48823 invoked by alias); 30 Aug 2018 15:15:46 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 28760 invoked by uid 89); 30 Aug 2018 15:15:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Water, reaching, GTY, gty X-HELO: mail-yw1-f51.google.com Received: from mail-yw1-f51.google.com (HELO mail-yw1-f51.google.com) (209.85.161.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Aug 2018 15:15:33 +0000 Received: by mail-yw1-f51.google.com with SMTP id m62-v6so3586072ywd.6 for ; Thu, 30 Aug 2018 08:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=xsLrbEPnuKARyP0ye289LjX3l0WjzDkyVD/3eBxo5eI=; b=BxilgEcLf/9B7acXbr8y38Ab6TruGjtNoPri3S1dLykxzFEzu7KaWrUmgb+zPr9dWQ Zg5fe/knRwMOeaN0tn3Q/0ujWOzZTA0BCKqnr59lUMzTeKz2WikisXQ+mHRh11JfnNef d7UQPIz5V0M/EFngxgM/kx6e5fkn8/UUtBML9c+vmjrIvmHJfYzu5uRcxSsH+eQMHdQH AA6WoX4SPwMbU3RkL7KT32ANl0RQMEe2X1Yv3gXcEJXheC2HSLyJOWIzF4PvMrf2+k3J ozCfcyTjB8BUgF72r9ZG94QqOhh+6r59haZruvrxpQx9BuWO+vnymybzGAHL0S5VbC1x eBkA== Received: from ?IPv6:2620:10d:c0a3:20fb:7500:e7fb:4a6f:2254? ([2620:10d:c091:200::3:c6f]) by smtp.googlemail.com with ESMTPSA id j66-v6sm3232715ywc.61.2018.08.30.08.15.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 08:15:17 -0700 (PDT) Sender: Nathan Sidwell To: GCC Patches From: Nathan Sidwell Subject: [libcpp] fix some line map comments Message-ID: Date: Thu, 30 Aug 2018 11:15:15 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 A couple of cleanups for comments. committing to trunk. nathan 2018-08-30 Nathan Sidwell * include/line-map.h (enum lc_reason): Comment each member separately. (struct line_maps): Fix reallocator comment. Index: include/line-map.h =================================================================== --- include/line-map.h (revision 263986) +++ include/line-map.h (working copy) @@ -61,20 +61,14 @@ inline int compare (linenum_type lhs, li return 0; } -/* Reason for creating a new line map with linemap_add. LC_ENTER is - when including a new file, e.g. a #include directive in C. - LC_LEAVE is when reaching a file's end. LC_RENAME is when a file - name or line number changes for neither of the above reasons - (e.g. a #line directive in C); LC_RENAME_VERBATIM is like LC_RENAME - but a filename of "" is not specially interpreted as standard - input. LC_ENTER_MACRO is when a macro expansion is about to start. */ +/* Reason for creating a new line map with linemap_add. */ enum lc_reason { - LC_ENTER = 0, - LC_LEAVE, - LC_RENAME, - LC_RENAME_VERBATIM, - LC_ENTER_MACRO, + LC_ENTER = 0, /* Begin #include. */ + LC_LEAVE, /* Return to including file. */ + LC_RENAME, /* Other reason for name change. */ + LC_RENAME_VERBATIM, /* Likewise, but "" != stdin. */ + LC_ENTER_MACRO, /* Begin macro expansion. */ /* FIXME: add support for stringize and paste. */ LC_HWM /* High Water Mark. */ }; @@ -777,8 +771,7 @@ struct GTY(()) line_maps { may require allocating a new line_map. */ unsigned int max_column_hint; - /* If non-null, the allocator to use when resizing 'maps'. If null, - xrealloc is used. */ + /* The allocator to use when resizing 'maps', defaults to xrealloc. */ line_map_realloc reallocator; /* The allocators' function used to know the actual size it