summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
diff options
context:
space:
mode:
authorVassil Vassilev <v.g.vassilev@gmail.com>2016-02-28 19:08:24 +0000
committerVassil Vassilev <v.g.vassilev@gmail.com>2016-02-28 19:08:24 +0000
commit4d75e8d6761cb950b410d99fc09319bad51b14cb (patch)
tree375687cdc2021ffa691c12380c7e6c8351fdc3e3 /clang/test/Modules
parentdf0cd72657c898b1ed2b67c55b41459bc3ab5ab0 (diff)
downloadbcm5719-llvm-4d75e8d6761cb950b410d99fc09319bad51b14cb.tar.gz
bcm5719-llvm-4d75e8d6761cb950b410d99fc09319bad51b14cb.zip
[modules] Prefer more complete array types.
If we import a module that has a complete array type and one that has an incomplete array type, the declaration found by name lookup might be the one with the incomplete type, possibly resulting in rejects-valid. Now, the name lookup prefers decls with a complete array types. Also, diagnose cases when the redecl chain has array bound, different from the merge candidate. Reviewed by Richard Smith. llvm-svn: 262189
Diffstat (limited to 'clang/test/Modules')
-rw-r--r--clang/test/Modules/Inputs/PR26179/A.h2
-rw-r--r--clang/test/Modules/Inputs/PR26179/B.h1
-rw-r--r--clang/test/Modules/Inputs/PR26179/basic_string.h2
3 files changed, 0 insertions, 5 deletions
diff --git a/clang/test/Modules/Inputs/PR26179/A.h b/clang/test/Modules/Inputs/PR26179/A.h
index ce95fafb4bf..c264f4cf9bf 100644
--- a/clang/test/Modules/Inputs/PR26179/A.h
+++ b/clang/test/Modules/Inputs/PR26179/A.h
@@ -1,4 +1,2 @@
#include "basic_string.h"
#include "B.h"
-
-int *p = a;
diff --git a/clang/test/Modules/Inputs/PR26179/B.h b/clang/test/Modules/Inputs/PR26179/B.h
index eb8d1c29e79..46a109efdb5 100644
--- a/clang/test/Modules/Inputs/PR26179/B.h
+++ b/clang/test/Modules/Inputs/PR26179/B.h
@@ -1,2 +1 @@
#include "basic_string.h"
-extern int a[5];
diff --git a/clang/test/Modules/Inputs/PR26179/basic_string.h b/clang/test/Modules/Inputs/PR26179/basic_string.h
index afd1e0d3b34..653ce078451 100644
--- a/clang/test/Modules/Inputs/PR26179/basic_string.h
+++ b/clang/test/Modules/Inputs/PR26179/basic_string.h
@@ -9,6 +9,4 @@ struct basic_string {
template<typename T>
T basic_string<T>::_S_empty_rep_storage[sizeof(T)];
-extern int a[];
-
#endif
OpenPOWER on IntegriCloud