Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] gdbadmin/ss/gdb_ari.sh update UCASE rule
@ 2009-04-14 21:49 Pierre Muller
  2009-04-15  7:25 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2009-04-14 21:49 UTC (permalink / raw)
  To: gdb-patches

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")
     }


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-20 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-14 21:49 [RFA] gdbadmin/ss/gdb_ari.sh update UCASE rule Pierre Muller
2009-04-15  7:25 ` Eli Zaretskii
2009-04-20 16:01   ` [PATCH] gdbadmin/ss/gdb_ari.sh modify editCase/UCASE rules Pierre Muller
2009-04-20 17:15     ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox