summaryrefslogtreecommitdiff
path: root/test/Modules/cxx-decls.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-05-16 02:14:42 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-05-16 02:14:42 +0000
commit4a449d09baa6d0eeb8db4fbd1d63ea8bfd1e9dda (patch)
treefa001107cb5598d61a3c42901c2e0f524f9af57a /test/Modules/cxx-decls.cpp
parent3de046affd23f59ac45bc45bcfaba730d0313c84 (diff)
downloadclang-4a449d09baa6d0eeb8db4fbd1d63ea8bfd1e9dda.tar.gz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208944 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules/cxx-decls.cpp')
-rw-r--r--test/Modules/cxx-decls.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Modules/cxx-decls.cpp b/test/Modules/cxx-decls.cpp
index d37594afb5..49ba8340d3 100644
--- a/test/Modules/cxx-decls.cpp
+++ b/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); }