]> granicus.if.org Git - clang/commit
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)
commitd943352fabd065ce2eaa21f4a550ed2ffa5353ab
treee82f4e3d5879fc9adb12f1886e5a6cc8630e6cb4
parent6887ff2c70f4afba4e521f8779d041e6d02df464
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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185100 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/SemaCXX/MicrosoftExtensions.cpp