summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-10-31 00:33:20 -0700
committerIan Rogers <irogers@google.com>2014-11-03 20:01:04 -0800
commit6a3c1fcb4ba42ad4d5d142c17a3712a6ddd3866f (patch)
tree9df58b57af13240a93a6da4eefcf03f70cce9ad9 /tools
parentc6e0955737e15f7c0c3575d4e13789b3411f4993 (diff)
downloadart-6a3c1fcb4ba42ad4d5d142c17a3712a6ddd3866f.tar.gz
art-6a3c1fcb4ba42ad4d5d142c17a3712a6ddd3866f.tar.bz2
art-6a3c1fcb4ba42ad4d5d142c17a3712a6ddd3866f.zip
Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags.
Fix associated errors about unused paramenters and implict sign conversions. For sign conversion this was largely in the area of enums, so add ostream operators for the effected enums and fix tools/generate-operator-out.py. Tidy arena allocation code and arena allocated data types, rather than fixing new and delete operators. Remove dead code. Change-Id: I5b433e722d2f75baacfacae4d32aef4a828bfe1b
Diffstat (limited to 'tools')
-rwxr-xr-xtools/generate-operator-out.py28
1 files changed, 17 insertions, 11 deletions
diff --git a/tools/generate-operator-out.py b/tools/generate-operator-out.py
index f666ad154b..2b57222049 100755
--- a/tools/generate-operator-out.py
+++ b/tools/generate-operator-out.py
@@ -39,6 +39,7 @@ def Confused(filename, line_number, line):
def ProcessFile(filename):
lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n')
in_enum = False
+ is_enum_private = False
is_enum_class = False
line_number = 0
@@ -57,15 +58,16 @@ def ProcessFile(filename):
# Except when it's private
if m.group(3) is not None:
- continue
-
- is_enum_class = m.group(1) is not None
- enum_name = m.group(2)
- if len(enclosing_classes) > 0:
- enum_name = '::'.join(enclosing_classes) + '::' + enum_name
- _ENUMS[enum_name] = []
- _NAMESPACES[enum_name] = '::'.join(namespaces)
- _ENUM_CLASSES[enum_name] = is_enum_class
+ is_enum_private = True
+ else:
+ is_enum_private = False
+ is_enum_class = m.group(1) is not None
+ enum_name = m.group(2)
+ if len(enclosing_classes) > 0:
+ enum_name = '::'.join(enclosing_classes) + '::' + enum_name
+ _ENUMS[enum_name] = []
+ _NAMESPACES[enum_name] = '::'.join(namespaces)
+ _ENUM_CLASSES[enum_name] = is_enum_class
in_enum = True
continue
@@ -80,11 +82,11 @@ def ProcessFile(filename):
continue
# Is this the start or end of an enclosing class or struct?
- m = re.compile(r'^(?:class|struct)(?: MANAGED)? (\S+).* \{').search(raw_line)
+ m = re.compile(r'^\s*(?:class|struct)(?: MANAGED)?(?: PACKED\([0-9]\))? (\S+).* \{').search(raw_line)
if m:
enclosing_classes.append(m.group(1))
continue
- m = re.compile(r'^\};').search(raw_line)
+ m = re.compile(r'^\s*\}( .*)?;').search(raw_line)
if m:
enclosing_classes = enclosing_classes[0:len(enclosing_classes) - 1]
continue
@@ -99,6 +101,9 @@ def ProcessFile(filename):
in_enum = False
continue
+ if is_enum_private:
+ continue
+
# The only useful thing in comments is the <<alternate text>> syntax for
# overriding the default enum value names. Pull that out...
enum_text = None
@@ -146,6 +151,7 @@ def ProcessFile(filename):
# There shouldn't be anything left.
if len(rest):
+ sys.stderr.write('%s\n' % (rest))
Confused(filename, line_number, raw_line)
if len(enclosing_classes) > 0: