summaryrefslogtreecommitdiffstats
path: root/clang/docs/tools
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2018-12-11 19:30:49 +0000
committerAaron Ballman <aaron@aaronballman.com>2018-12-11 19:30:49 +0000
commit94f3e74bc805884735252e638b024edccd0701e1 (patch)
tree7430beb0acc9365d7099ee0b1f7f1a714e912cdb /clang/docs/tools
parentfed6740374bc53b02eee98870ce0c3e879d72baa (diff)
downloadbcm5719-llvm-94f3e74bc805884735252e638b024edccd0701e1.tar.gz
bcm5719-llvm-94f3e74bc805884735252e638b024edccd0701e1.zip
Stop stripping comments from AST matcher example code.
The AST matcher documentation dumping script was being a bit over-zealous about stripping comment markers, which ended up causing comments in example code to stop being comments. Fix that by only stripping comments at the start of a line, rather than removing any forward slash (which also impacts prose text). llvm-svn: 348891
Diffstat (limited to 'clang/docs/tools')
-rwxr-xr-xclang/docs/tools/dump_ast_matchers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/docs/tools/dump_ast_matchers.py b/clang/docs/tools/dump_ast_matchers.py
index 792f911e689..2c0cbafa8ab 100755
--- a/clang/docs/tools/dump_ast_matchers.py
+++ b/clang/docs/tools/dump_ast_matchers.py
@@ -354,7 +354,7 @@ for line in open(MATCHERS_FILE).read().splitlines():
allowed_types += [m.group(1)]
continue
if line.strip() and line.lstrip()[0] == '/':
- comment += re.sub(r'/+\s?', '', line) + '\n'
+ comment += re.sub(r'^/+\s?', '', line) + '\n'
else:
declaration += ' ' + line
if ((not line.strip()) or
OpenPOWER on IntegriCloud