summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-12 16:21:56 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-12 16:22:15 +0300
commit66e897f77b30d9add357dcff62a33e8ee16d2cc0 (patch)
tree722b2a11f02220bc75b2f1d89dc9c799ec93d2de
parent3f09c82c2bdd9b970f075762174f08e98cea62f2 (diff)
downloaddeheader-66e897f77b30d9add357dcff62a33e8ee16d2cc0.tar.gz
deheader-66e897f77b30d9add357dcff62a33e8ee16d2cc0.tar.bz2
deheader-66e897f77b30d9add357dcff62a33e8ee16d2cc0.tar.xz
deheader-66e897f77b30d9add357dcff62a33e8ee16d2cc0.zip
Check preprocessor blocks only if parent was allowed to parse.
-rwxr-xr-xdeheader3
1 files changed, 2 insertions, 1 deletions
diff --git a/deheader b/deheader
index e77dcae..f1aaf28 100755
--- a/deheader
+++ b/deheader
@@ -1282,7 +1282,8 @@ class InclusionMap:
cnt = cnt + 1
c = match_preproc(["ifndef", "ifdef", "if"], line)
if c is not False:
- allow_parse_includes = self.check_block(sourcefile, cnt, compiler, defines, maker, verbosity, showerrs, subdir)
+ if allow_parse_includes == True:
+ allow_parse_includes = self.check_block(sourcefile, cnt, compiler, defines, maker, verbosity, showerrs, subdir)
conditions.append((c, allow_parse_includes))
elif match_preproc("else", line) is not False:
allow_parse_includes = not allow_parse_includes