diff options
author | Anthony Barbier <anthony.barbier@arm.com> | 2017-07-25 11:02:08 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:16:42 +0100 |
commit | 81bf196a8ea44be9b42a9f9b6f8eca3f016c36e2 (patch) | |
tree | d2357f1e00ee2e9038646642debbe45504397ee6 /scripts | |
parent | 935deee193c1a7597e358ebbe50a9aeff14dcb3d (diff) | |
download | ComputeLibrary-81bf196a8ea44be9b42a9f9b6f8eca3f016c36e2.tar.gz |
COMPMID-415 Fixed format_doxygen.py to handle cpp comments inside strings
Change-Id: Ib0b698bcd52d89629b9208b89357507833429799
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/81522
Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/format_doxygen.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/scripts/format_doxygen.py b/scripts/format_doxygen.py index 64fe7ecbce..da52f7e2a3 100755 --- a/scripts/format_doxygen.py +++ b/scripts/format_doxygen.py @@ -137,15 +137,19 @@ if __name__ == "__main__": # Match end of C-style comment */ if re.search(r"\*/", line): - #print("End comment {}".format(n_line)) + if re.search('"[^"]*\*/[^"]*"', line): + #print("End of comment inside a string: ignoring") + pass + else: + #print("End comment {}".format(n_line)) - if len(comment) < 1: - raise Exception("Was not in a comment! ({})".format(n_line)) + if len(comment) < 1: + raise Exception("Was not in a comment! ({})".format(n_line)) - #print("Process comment {} {}".format(first_param, last_param)) + #print("Process comment {} {}".format(first_param, last_param)) - process_comment(fd, comment, first_param, last_param) + process_comment(fd, comment, first_param, last_param) - comment = list() - first_param = -1 - last_param = -1 + comment = list() + first_param = -1 + last_param = -1 |