Under -fms-extensions, only inject a friend tag name when we didn't see a tag with...
authorDouglas Gregor <dgregor@apple.com>
Thu, 27 Jun 2013 20:42:30 +0000 (20:42 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 27 Jun 2013 20:42:30 +0000 (20:42 +0000)
commitf83b4ea8b6482630238645c241504b3694c283e8
tree7a5ffe4d3bd2d1e65337d2cd2246e92c2c707c80
parentccaf3321f1caaaeb8672758753245a521aa77f63
Under -fms-extensions, only inject a friend tag name when we didn't see a tag with that name in an enclosing scope.

r177473 made us correctly consider only those declarations in the
enclosing namespace scope when looking for a friend declaration. Under
ms-extensions mode, where we do some level of friend injection, this
meant that we were introducing a new tag type into a different scope
than what Microsoft actually does. Address this by only doing the
friend injection when we didn't see any tag with that name in any
outer scope. Fixes <rdar://problem/14250378>.

llvm-svn: 185100
clang/lib/Sema/SemaDecl.cpp
clang/test/SemaCXX/MicrosoftExtensions.cpp