diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-05-16 02:14:42 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-05-16 02:14:42 +0000 |
| commit | debcd500a0e184cc17254622411a9cc8e9dcfaa0 (patch) | |
| tree | 64d9287024766743b0d44e11d6d056ca19365d75 /clang/test/Modules | |
| parent | ee390436b92ce1df7873c3dcc744b809841cc4c5 (diff) | |
| download | bcm5719-llvm-debcd500a0e184cc17254622411a9cc8e9dcfaa0.tar.gz bcm5719-llvm-debcd500a0e184cc17254622411a9cc8e9dcfaa0.zip | |
Push implicitly-declared allocation functions into the IdResolver. Otherwise,
declaration merging in modules is unable to find them and we get bogus errors
and even crashes.
llvm-svn: 208944
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/Inputs/cxx-decls-imported.h | 2 | ||||
| -rw-r--r-- | clang/test/Modules/cxx-decls.cpp | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/cxx-decls-imported.h b/clang/test/Modules/Inputs/cxx-decls-imported.h index 959d3feaaf0..5c7f6fc3442 100644 --- a/clang/test/Modules/Inputs/cxx-decls-imported.h +++ b/clang/test/Modules/Inputs/cxx-decls-imported.h @@ -18,3 +18,5 @@ private: static_assert(!__is_trivial(HasNontrivialDefaultConstructor), ""); static_assert(!__has_trivial_constructor(HasNontrivialDefaultConstructor), ""); + +void *operator new[](__SIZE_TYPE__); diff --git a/clang/test/Modules/cxx-decls.cpp b/clang/test/Modules/cxx-decls.cpp index d37594afb56..49ba8340d3e 100644 --- a/clang/test/Modules/cxx-decls.cpp +++ b/clang/test/Modules/cxx-decls.cpp @@ -3,6 +3,8 @@ // expected-no-diagnostics +void use_implicit_new() { operator new[](3); } + @import dummy; @import cxx_decls.imported; @@ -22,3 +24,5 @@ void test_friends(HasFriends s) { static_assert(!__is_trivial(HasNontrivialDefaultConstructor), ""); static_assert(!__has_trivial_constructor(HasNontrivialDefaultConstructor), ""); + +void use_implicit_new_again() { operator new[](3); } |

