[cfe-commits] r137573 - in /cfe/trunk: include/clang/AST/ include/clang/Basic/ include/clang/Sema/ include/clang/Serialization/ lib/AST/ lib/CodeGen/ lib/Sema/ lib/Serialization/ test/SemaTemplate/ tools/libclang/
Sebastian Redl
sebastian.redl at getdesigned.at
Sun Aug 14 00:43:00 PDT 2011
On 14.08.2011, at 05:52, Francois Pichet wrote:
> Author: fpichet
> Date: Sat Aug 13 22:52:19 2011
> New Revision: 137573
>
> URL: http://llvm.org/viewvc/llvm-project?rev=137573&view=rev
> Log:
> Implement function template specialization at class scope extension in Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization.
>
> Example:
> template <class T>
> class A {
> public:
> template <class U> void f(U p) { }
> template <> void f(int p) { } // <== class scope specialization
> };
>
> This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code.
> BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error.
This is an awesome milestone. Congratulations!
Sebastian
More information about the cfe-commits
mailing list