[cfe-commits] r95972 - in /cfe/trunk: lib/Lex/PPDirectives.cpp test/Preprocessor/mi_opt2.c test/Preprocessor/mi_opt2.h

Chris Lattner clattner at apple.com
Fri Feb 12 10:28:06 PST 2010


On Feb 12, 2010, at 4:50 AM, Neil Booth wrote:
>> +// CHECK: b: 1
>> +// CHECK: b: 2
>> +
> 
> Chris - forgetting Clang's implementation, I cannot agree with
> the comment and rationale here.  The reason that no include guard
> optimization is valid is because the header has a non-empty #else.
> The status of the macro on initial inclusion is irrelevant.

I agree with you, but:

a) we don't currently see the #else because of the current implementation of the MI optimziation.
b) this is not a case that matters in practice, fighting to catch it is not worth it.

-Chris



More information about the cfe-commits mailing list