diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-04-08 20:53:26 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-04-08 20:53:26 +0000 |
commit | 1e8e91b3795b7c2cebab909fd979dce21768a755 (patch) | |
tree | 5842a300bdaf71a3ade90842443d440810f92ecb /clang/test/Modules | |
parent | 1f492893ac015ed6aae8427a6de4f30dd9d2feb8 (diff) | |
download | bcm5719-llvm-1e8e91b3795b7c2cebab909fd979dce21768a755.tar.gz bcm5719-llvm-1e8e91b3795b7c2cebab909fd979dce21768a755.zip |
PR25501: Delay loading visible updates for a declaration until after we've
processed update records. If an update record adds a definition, we need to
merge that with any pre-existing definition to determine which the canonical
definition is before we apply the visible update, otherwise we wouldn't know
where to apply it.
Thanks to Vassil Vassilev for help reducing this and tracking down the problem.
llvm-svn: 265848
Diffstat (limited to 'clang/test/Modules')
-rw-r--r-- | clang/test/Modules/Inputs/PR25501/Vector.h | 5 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/PR25501/a0.h | 1 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/PR25501/a1.h | 1 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/PR25501/a2.h | 3 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/PR25501/b.h | 2 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/PR25501/module.modulemap | 4 | ||||
-rw-r--r-- | clang/test/Modules/pr25501.cpp | 9 |
7 files changed, 25 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/PR25501/Vector.h b/clang/test/Modules/Inputs/PR25501/Vector.h new file mode 100644 index 00000000000..9da48303a3a --- /dev/null +++ b/clang/test/Modules/Inputs/PR25501/Vector.h @@ -0,0 +1,5 @@ +template <typename> struct _Vector_base {}; +struct vector { + vector() {} + vector(_Vector_base<int>); +}; diff --git a/clang/test/Modules/Inputs/PR25501/a0.h b/clang/test/Modules/Inputs/PR25501/a0.h new file mode 100644 index 00000000000..1a0d306ca7c --- /dev/null +++ b/clang/test/Modules/Inputs/PR25501/a0.h @@ -0,0 +1 @@ +#include "Vector.h" diff --git a/clang/test/Modules/Inputs/PR25501/a1.h b/clang/test/Modules/Inputs/PR25501/a1.h new file mode 100644 index 00000000000..1a0d306ca7c --- /dev/null +++ b/clang/test/Modules/Inputs/PR25501/a1.h @@ -0,0 +1 @@ +#include "Vector.h" diff --git a/clang/test/Modules/Inputs/PR25501/a2.h b/clang/test/Modules/Inputs/PR25501/a2.h new file mode 100644 index 00000000000..7876f310e85 --- /dev/null +++ b/clang/test/Modules/Inputs/PR25501/a2.h @@ -0,0 +1,3 @@ +#include "a0.h" +vector aaa = vector(); +#include "a1.h" diff --git a/clang/test/Modules/Inputs/PR25501/b.h b/clang/test/Modules/Inputs/PR25501/b.h new file mode 100644 index 00000000000..7b519836953 --- /dev/null +++ b/clang/test/Modules/Inputs/PR25501/b.h @@ -0,0 +1,2 @@ +#include "Vector.h" +vector aaa = vector(); diff --git a/clang/test/Modules/Inputs/PR25501/module.modulemap b/clang/test/Modules/Inputs/PR25501/module.modulemap new file mode 100644 index 00000000000..c6c8d5ca40f --- /dev/null +++ b/clang/test/Modules/Inputs/PR25501/module.modulemap @@ -0,0 +1,4 @@ +module "a0" { header "a0.h" export * } +module "a1" { header "a1.h" export * } +module "a2" { header "a2.h" export * } +module "b" { header "b.h" export * } diff --git a/clang/test/Modules/pr25501.cpp b/clang/test/Modules/pr25501.cpp new file mode 100644 index 00000000000..18002d6dff3 --- /dev/null +++ b/clang/test/Modules/pr25501.cpp @@ -0,0 +1,9 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -std=c++11 -fmodules -fmodule-map-file=%S/Inputs/PR25501/module.modulemap -fmodules-cache-path=%t -I%S/Inputs/PR25501 -verify %s + +#include "a2.h" +#include "b.h" + +auto use = aaa; + +// expected-no-diagnostics |