[cfe-dev] Confusing comments in PCHReader
Douglas Gregor
dgregor at apple.com
Sat Jul 18 00:32:05 PDT 2009
On Jul 7, 2009, at 5:03 PM, Zhongxing Xu wrote:
> In file PCHReader.cpp:1472: "Initialization of builtins and library
> builtins occurs before the ...". But actually we do not initialize any
> builtins if pch file is included, see clang-cc.cpp:2292.
Ah, right. This comment was written before the builtins were
effectively moved into the PCH file (rather than being re-created each
time the compiler is executed).
> Only keywords
> and pragmas are initialized at that point. Shall we change this
> comment to: "Initialization of keywords and pragmas occurs before
> ..."?
Yes, please.
> And since keywords can not be redefined, only pragmas can be
> repopulated. Is it right?
I believe that's right. One could look at the contents of the
identifier table at this point in PCH loading to see if any other
identifiers are sneaking in.
- Doug
More information about the cfe-dev
mailing list