This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] gdbadmin/ss/gdb_ari.sh update UCASE rule
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Tue, 14 Apr 2009 23:49:33 +0200
- Subject: [RFA] gdbadmin/ss/gdb_ari.sh update UCASE rule
The current UCASE rule
triggers lost of false warnings
as for instance
gdb/breakpoint.c:8522: code: UCASE function: Function name is uppercase.
gdb/breakpoint.c:8520: /* Create a vector of all tracepoints. */
gdb/breakpoint.c:8521:
gdb/breakpoint.c:8522: VEC(breakpoint_p) *
gdb/breakpoint.c:8523: all_tracepoints ()
gdb/breakpoint.c:8524: {
I propose a rule that only looks for:
a function name starting with a capital letter at the start
of the line, followed by a open brace, optionally parameters, a closing
brace
and nothing else (apart from spaces)
This decreases the number of UCASE code warnings from 66 to 15.
The test is still not perfect but at least,
most VEC.* related problems are gone.
Is this OK?
Pierre Muller
Pascal language support maintainer for GDB
Index: gdb_ari.sh
===================================================================
RCS file: /cvs/gdbadmin/ss/gdb_ari.sh,v
retrieving revision 1.85
diff -u -r1.85 gdb_ari.sh
--- gdb_ari.sh 14 Apr 2009 21:19:19 -0000 1.85
+++ gdb_ari.sh 14 Apr 2009 21:42:28 -0000
@@ -461,7 +461,7 @@
Function name is uppercase."
category["UCASE function"] = ari_code
}
-/^[A-Z][[:alnum:]_]*[[:space:]]*\(/ {
+/^[A-Z][[:alnum:]_]*[[:space:]]*\([^()]*\)[[:space:]]*$/ {
if (is_yacc_or_lex == 0) {
fail("UCASE function")
}