fix "Comment#1" from PR3872

llvm-svn: 67625
This commit is contained in:
Chris Lattner 2009-03-24 17:05:27 +00:00
parent 803802d4d6
commit deab7250fb
2 changed files with 10 additions and 2 deletions

View File

@ -74,7 +74,7 @@ namespace {
void AddEntry(bool isTypename, IdentifierInfo *II) {
TypeNameInfo *TI = Allocator.Allocate<TypeNameInfo>();
new (TI) TypeNameInfo(1, II->getFETokenInfo<TypeNameInfo>());
new (TI) TypeNameInfo(isTypename, II->getFETokenInfo<TypeNameInfo>());
II->setFETokenInfo(TI);
}

View File

@ -1,6 +1,14 @@
// RUN: clang-cc %s -fsyntax-only
// RUN: clang-cc %s -parse-noop
// Test the X can be overloaded inside the struct.
typedef int X;
struct Y { short X; };
// Variable shadows type, PR3872
typedef struct foo { int x; } foo;
void test() {
foo *foo;
foo->x = 0;
}