diff options
author | Steve Naroff <snaroff@apple.com> | 2007-08-30 01:06:46 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2007-08-30 01:06:46 +0000 |
commit | fb22d96692c5240fb8d611290dbf7eeed3759c73 (patch) | |
tree | 436250f2d163b6d3f4ecd02a482649442e24b108 /include/clang/Basic/SourceManager.h | |
parent | 17a1a72e70dcbd6257dde644c790a3013113174f (diff) |
Fix the following redefinition errors submitted by Keith Bauer...
[dylan:~/llvm/tools/clang] admin% cat tentative_decls.c
// incorrectly generates redefinition error
extern int array[3];
int array[3];
// incorrectly generates a redefinition error
extern void nup(int a[3]);
void nup(int a[3]) {}
It turns out that this exposed a fairly major flaw in the type system,
array types were never getting uniqued! This is because all array types
contained an expression, which aren't unique.
To solve this, we now have 2 array types, ConstantArrayType and
VariableArrayType. ConstantArrayType's are unique, VAT's aren't.
This is a fairly extensive set of fundamental changes. Fortunately,
all the tests pass. Nevertheless, there may be some collateral damage:-)
If so, let me know!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
0 files changed, 0 insertions, 0 deletions