[Preprocessor] Stop entering included files after hitting a fatal error.
authorVolodymyr Sapsai <vsapsai@apple.com>
Wed, 25 Jul 2018 19:16:26 +0000 (19:16 +0000)
committerVolodymyr Sapsai <vsapsai@apple.com>
Wed, 25 Jul 2018 19:16:26 +0000 (19:16 +0000)
commit482070b40a52d1dc1425b8a647686f7949ec2e19
tree15b605b114e016932805fb104f1d956dc44e7860
parentd78b3945430b928d340963c88c8d06de2e94e968
[Preprocessor] Stop entering included files after hitting a fatal error.

Fixes a problem when we have multiple inclusion cycles and try to
enumerate all possible ways to reach the max inclusion depth.

rdar://problem/38871876

Reviewers: bruno, rsmith, jkorous, aaron.ballman

Reviewed By: bruno, jkorous, aaron.ballman

Subscribers: dexonsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D48786

llvm-svn: 337953
clang/lib/Lex/PPDirectives.cpp
clang/test/Preprocessor/Inputs/cycle/a.h [new file with mode: 0644]
clang/test/Preprocessor/Inputs/cycle/b.h [new file with mode: 0644]
clang/test/Preprocessor/Inputs/cycle/c.h [new file with mode: 0644]
clang/test/Preprocessor/include-cycle.c [new file with mode: 0644]