[cfe-commits] [PATCH][MS] - operator __uuidof implementation part 1

Francois Pichet pichet2000 at gmail.com
Sun Sep 5 13:38:00 PDT 2010


Hi,

Updated patch attached.


> Is __uuidof only available in C++ mode, or does MSVC also allow it in C mode?

yes __uuidof is only available in C++ mode.

> Is there anything dynamci about __uuidof? In other words, is the result of __uuidof always a constant, or can it involve run-time computation? If it does not involve run-time computation, then you can use the Unevaluated context rather than the PotentiallyPotentiallyEvaluated context.

No there is nothing dynamic about __uuidof. It is always resolved at
compile time. So I changed the code to use the Unevaluated context.
Not sure exactly why, I am still learning clang internal design.

> You shouldn't do this lookup every time. Instead, you should perform the lookup for _GUID lazily and cache the result in Sema.

Done

> Otherwise, things are looking good!  Don't forget to add AST reading/writing support for this new expression kind.

AST reading and writing added.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ms_uuidof.patch
Type: application/octet-stream
Size: 23633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100905/923b9902/attachment.obj>


More information about the cfe-commits mailing list