Hacker News new | ask | show | jobs
by loeg 2760 days ago
> Is it trivial to implement?

Yes.

https://github.com/llvm-mirror/clang/blob/799b6c6d7/lib/Lex/...

https://github.com/llvm-mirror/clang/blob/799b6c6d7/include/...

1 comments

I agree that it's trivial to invoke a member function called MarkFileIncludeOnce on some object in response to encountering a #pragma once.

I don't think there is any good way to specify how this should behave for all the corner cases; but a given specification isn't hard to implement.