diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-12-19 18:19:24 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-12-19 18:19:24 +0000 |
| commit | 074a409622d720f28396109f32b49e3f94fa3374 (patch) | |
| tree | c625a0e4c2066ffa238e649fda2119b184cb061f /clang/test/Modules | |
| parent | a7d24216033bfd49478150a292422f03cf0dcfc8 (diff) | |
| download | bcm5719-llvm-074a409622d720f28396109f32b49e3f94fa3374.tar.gz bcm5719-llvm-074a409622d720f28396109f32b49e3f94fa3374.zip | |
Re-implement (de-)serialization of redeclaration chains for
redeclaration templates (RedeclarableTemplateDecl), similarly to the
way (de-)serialization is implemented for Redeclarable<T>. In the
process, found a simpler formulation for handling redeclaration
chains and implemented that in both places.
The new test establishes that we're building the redeclaration chains
properly. However, the FIXME indicates where we're tickling a
different bug that has to do with us not setting the DefinitionData
pointer properly in redeclarations that we detected after the
definition itself was deserialized. The (separable) fix for that bug
is forthcoming.
llvm-svn: 146883
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/Inputs/redecl-merge-bottom.h | 8 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/redecl-merge-left.h | 5 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/redecl-merge-right.h | 6 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/redecl-merge-top.h | 4 | ||||
| -rw-r--r-- | clang/test/Modules/redecl-merge.m | 7 |
5 files changed, 30 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/redecl-merge-bottom.h b/clang/test/Modules/Inputs/redecl-merge-bottom.h index 198bde3e5fa..1c59c1f2234 100644 --- a/clang/test/Modules/Inputs/redecl-merge-bottom.h +++ b/clang/test/Modules/Inputs/redecl-merge-bottom.h @@ -5,3 +5,11 @@ __import_module__ redecl_merge_right; @class A; +#ifdef __cplusplus +template<typename T> class Vector; + +template<typename T> class Vector; + +template<typename T> class Vector; +#endif + diff --git a/clang/test/Modules/Inputs/redecl-merge-left.h b/clang/test/Modules/Inputs/redecl-merge-left.h index d97fb7b25ce..8e2fa53ae13 100644 --- a/clang/test/Modules/Inputs/redecl-merge-left.h +++ b/clang/test/Modules/Inputs/redecl-merge-left.h @@ -10,3 +10,8 @@ __import_module__ redecl_merge_top; @class A; +#ifdef __cplusplus +template<typename T> class Vector; + +template<typename T> class Vector; +#endif diff --git a/clang/test/Modules/Inputs/redecl-merge-right.h b/clang/test/Modules/Inputs/redecl-merge-right.h index d8fd45f2b94..6d697347114 100644 --- a/clang/test/Modules/Inputs/redecl-merge-right.h +++ b/clang/test/Modules/Inputs/redecl-merge-right.h @@ -9,3 +9,9 @@ __import_module__ redecl_merge_top; @class B; +#ifdef __cplusplus +template<typename T> class Vector { +public: + void push_back(const T&); +}; +#endif diff --git a/clang/test/Modules/Inputs/redecl-merge-top.h b/clang/test/Modules/Inputs/redecl-merge-top.h index 68dae5058e2..64e2cc58d9d 100644 --- a/clang/test/Modules/Inputs/redecl-merge-top.h +++ b/clang/test/Modules/Inputs/redecl-merge-top.h @@ -5,3 +5,7 @@ @class A; @class B; + +#ifdef __cplusplus +template<typename T> class Vector; +#endif diff --git a/clang/test/Modules/redecl-merge.m b/clang/test/Modules/redecl-merge.m index 23524af3a56..c5da754dfe0 100644 --- a/clang/test/Modules/redecl-merge.m +++ b/clang/test/Modules/redecl-merge.m @@ -29,3 +29,10 @@ __import_module__ redecl_merge_bottom; void g(A *a) { [a init]; } + +#ifdef __cplusplus +void testVector() { + Vector<int> *vec_int; + // FIXME: vec_int.push_back(0); +} +#endif |

