From patchwork Mon Dec 15 05:53:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 4245 Received: (qmail 18918 invoked by alias); 15 Dec 2014 05:54:01 -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 18905 invoked by uid 89); 15 Dec 2014 05:54: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-f179.google.com Received: from mail-pd0-f179.google.com (HELO mail-pd0-f179.google.com) (209.85.192.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 15 Dec 2014 05:53:59 +0000 Received: by mail-pd0-f179.google.com with SMTP id fp1so11025583pdb.38 for ; Sun, 14 Dec 2014 21:53:58 -0800 (PST) X-Received: by 10.66.222.100 with SMTP id ql4mr48008372pac.123.1418622838146; Sun, 14 Dec 2014 21:53:58 -0800 (PST) Received: from sspiff.org (173-13-178-50-sfba.hfc.comcastbusiness.net. [173.13.178.50]) by mx.google.com with ESMTPSA id am14sm6255405pac.35.2014.12.14.21.53.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Dec 2014 21:53:57 -0800 (PST) Received: by sspiff.org (sSMTP sendmail emulation); Sun, 14 Dec 2014 21:53:04 -0800 From: Doug Evans To: gdb-patches@sourceware.org Subject: [PATCH 1/5] cp-namespace.c cleanup pass: whitespace Date: Sun, 14 Dec 2014 21:53:04 -0800 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hi. Part 1 is just whitespace to get it out of the way. 2014-12-14 Doug Evans * cp-namespace.c: Whitespace cleanup. diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c index 06290a7..1c52fa0 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; @@ -522,7 +521,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; struct symbol *result; @@ -581,10 +580,10 @@ cp_lookup_symbol_imports_or_template (const char *scope, return cp_lookup_symbol_via_imports (scope, name, block, domain, 1, 1); } - /* 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, @@ -593,7 +592,7 @@ cp_lookup_symbol_namespace (const char *scope, const domain_enum domain) { struct symbol *sym; - + /* First, try to find the symbol in the given namespace. */ sym = cp_lookup_symbol_in_namespace (scope, name, block, domain, 1); @@ -736,6 +735,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;