|
building preamble
--------------------------------------------------------------------------
https://reviews.llvm.org/D53866
--------------------------------------------------------------------------
If a header file was processed for the second time, we could end up with
a wrong conditional stack and skipped ranges:
In the particular example, if the header guard is evaluated the second
time and it is decided to skip the conditional block, the corresponding
"#endif" is never seen since the preamble does not include it and we end
up in the Tok.is(tok::eof) case with a wrong conditional stack.
Detect the circular inclusion, emit a diagnostic and stop processing the
inclusion.
Fixes: QTCREATORBUG-20883
Change-Id: I02644ddb507db4033dd5c69920c8e10500f0121c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|