From patchwork Wed Dec 17 09:23:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 4293 Received: (qmail 14076 invoked by alias); 17 Dec 2014 09:24:02 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 14043 invoked by uid 89); 17 Dec 2014 09:24:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pd0-f171.google.com Received: from mail-pd0-f171.google.com (HELO mail-pd0-f171.google.com) (209.85.192.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 17 Dec 2014 09:23:55 +0000 Received: by mail-pd0-f171.google.com with SMTP id y13so15842467pdi.2 for ; Wed, 17 Dec 2014 01:23:54 -0800 (PST) X-Received: by 10.66.236.36 with SMTP id ur4mr67123695pac.107.1418808234084; Wed, 17 Dec 2014 01:23:54 -0800 (PST) Received: from seba.sebabeach.org.gmail.com (173-13-178-53-sfba.hfc.comcastbusiness.net. [173.13.178.53]) by mx.google.com with ESMTPSA id bc4sm654548pbc.33.2014.12.17.01.23.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Dec 2014 01:23:53 -0800 (PST) From: Doug Evans To: gdb-patches@sourceware.org Subject: Re: [PATCH 1/5] cp-namespace.c cleanup pass: whitespace References: Date: Wed, 17 Dec 2014 01:23:01 -0800 In-Reply-To: (Doug Evans's message of "Sun, 14 Dec 2014 21:53:04 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Doug Evans writes: > Hi. > > Part 1 is just whitespace to get it out of the way. > > 2014-12-14 Doug Evans > > * cp-namespace.c: Whitespace cleanup. Hi. Here is a revised patch for current HEAD. 2014-12-17 Doug Evans * cp-namespace.c: Whitespace cleanup. diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c index f17cd69..bcb2275 100644 --- a/gdb/cp-namespace.c +++ b/gdb/cp-namespace.c @@ -95,7 +95,6 @@ cp_scan_for_anonymous_namespaces (const struct symbol *const symbol, } } - /* Add a using directive to using_directives. If the using directive in question has already been added, don't add it twice. @@ -121,7 +120,7 @@ cp_add_using_directive (const char *dest, { struct using_direct *current; struct using_direct *new; - + /* Has it already been added? */ for (current = using_directives; current != NULL; current = current->next) @@ -227,7 +226,7 @@ lookup_symbol_file (const char *name, So we only search the current file's global block. */ const struct block *global_block = block_global_block (block); - + if (global_block != NULL) sym = lookup_symbol_in_block (name, global_block, domain); } @@ -388,7 +387,7 @@ cp_lookup_symbol_via_imports (const char *scope, if (!declaration_only) sym = cp_lookup_symbol_in_namespace (scope, name, block, domain, 1); - + if (sym != NULL) return sym; @@ -532,7 +531,7 @@ cp_lookup_symbol_imports_or_template (const char *scope, /* Search the function's template parameters. */ if (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION (function)) { - struct template_symbol *templ + struct template_symbol *templ = (struct template_symbol *) function; result = search_symbol_list (name, @@ -613,10 +612,10 @@ cp_lookup_symbol_imports_or_template (const char *scope, return result; } - /* Searches for NAME in the current namespace, and by applying - relevant import statements belonging to BLOCK and its parents. - SCOPE is the namespace scope of the context in which the search is - being evaluated. */ +/* Searches for NAME in the current namespace, and by applying + relevant import statements belonging to BLOCK and its parents. + SCOPE is the namespace scope of the context in which the search is + being evaluated. */ struct symbol* cp_lookup_symbol_namespace (const char *scope, @@ -819,6 +818,7 @@ find_symbol_in_baseclass (struct type *parent_type, const char *name, sym = NULL; concatenated_name = NULL; cleanup = make_cleanup (free_current_contents, &concatenated_name); + for (i = 0; i < TYPE_N_BASECLASSES (parent_type); ++i) { size_t len;