[cfe-commits] r132332 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Sema/SemaDecl.cpp test/SemaCXX/MicrosoftExtensions.cpp

Francois Pichet pichet2000 at gmail.com
Tue May 31 21:21:16 PDT 2011


On Tue, May 31, 2011 at 1:02 PM, John McCall <rjmccall at apple.com> wrote:
> On May 31, 2011, at 4:44 AM, Francois Pichet wrote:
>> Author: fpichet
>> Date: Tue May 31 06:44:00 2011
>> New Revision: 132332
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=132332&view=rev
>> Log:
>> For compatibility with MSVC, a friend declaration also act as a forward declaration if the tag name is not already declared. The tag name is declared in the next outermost non record scope.
>
> This isn't necessary;  there's already logic in ActOnTag to inject a declaration of the class in the correct scope.  You just need to change it from "invisible unless already declared" to "always visible" in MSVC mode.
>

Ok thank for pointing that out. My new patch r132387 is now 2 lines.




More information about the cfe-commits mailing list