#!/usr/bin/env python
#
# Checks C++ files to make sure they conform to LLVM standards, as specified in
# http://llvm.org/docs/CodingStandards.html .
#
# TODO: add unittests for the verifier functions:
# http://docs.python.org/library/unittest.html .
"""Makes sure the #includes are in proper order and no disallows files are
#included.
Args:
filename: the file under consideration as string
lines: contents of the file as string array
"""
=
=
=
=
=
=
=
= 1
= None
= None
# TODO: implement private headers
# TODO: implement gtest headers
# TODO: implement top-level llvm/* headers
# TODO: implement llvm/Support/* headers
# Process Config/* headers
=
=
# Process system headers
=
=
# Is it disallowed?
:
# Make sure system headers are alphabetized amongst themselves
=
+= 1
return
= 80
=
return
=
return 0