diff options
author | Richard Smith <richard@metafoo.co.uk> | 2020-06-01 21:10:27 -0700 |
---|---|---|
committer | Richard Smith <richard@metafoo.co.uk> | 2020-06-01 22:03:05 -0700 |
commit | 4ccb6c36a9159809f4b98176325ae202753fe136 (patch) | |
tree | 47909c5b45336da9da6d7cf0a5a46d944f87a454 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | e51d5bc7a4fc967c8a99a75cfa9480eb6b3a4fae (diff) | |
download | llvm-4ccb6c36a9159809f4b98176325ae202753fe136.zip llvm-4ccb6c36a9159809f4b98176325ae202753fe136.tar.gz llvm-4ccb6c36a9159809f4b98176325ae202753fe136.tar.bz2 |
Fix violations of [basic.class.scope]p2.
These cases all follow the same pattern:
struct A {
friend class X;
//...
class X {};
};
But 'friend class X;' injects 'X' into the surrounding namespace scope,
rather than introducing a class member. So the second 'class X {}' is a
completely different type, which changes the meaning of the earlier name
'X' from '::X' to 'A::X'.
Additionally, the friend declaration is pointless -- members of a class
don't need to be befriended to be able to access private members.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions