Author: coke
Date: Thu Feb 21 08:35:32 2008
New Revision: 25934
Modified:
trunk/t/codingstd/c_macro_args.t
Log:
[codingstd]
A definite improvement to the regular expression checking for unwrapped
macro args.
Still not perfect.
Modified: trunk/t/codingstd/c_macro_args.t
==============================================================================
--- trunk/t/codingstd/c_macro_args.t (original)
+++ trunk/t/codingstd/c_macro_args.t Thu Feb 21 08:35:32 2008
@@ -59,7 +59,7 @@
# it's referenced in the definition.
if ($definition ne "") {
foreach my $arg (split /\s*,\s*/, $args) {
- if ($definition =~ m/\b[^(]$arg[^)]\b/) {
+ if ($definition =~ m/(?<!\(\b)$arg(?!\b\()/) {
push (@defines, "$path: $macro has unwrapped arg:
$arg\n");
}
}