Update new expression to make use of Declarator::getSourceRange().
References are not objects; implement this in Type::isObjectType().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64152 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/new-delete.cpp b/test/SemaCXX/new-delete.cpp
index 5618b47..7611264 100644
--- a/test/SemaCXX/new-delete.cpp
+++ b/test/SemaCXX/new-delete.cpp
@@ -64,6 +64,9 @@
(void)new (0L) int; // expected-error {{call to 'operator new' is ambiguous}}
// This must fail, because the member version shouldn't be found.
(void)::new ((S*)0) U; // expected-error {{no matching function for call to 'operator new'}}
+ (void)new (int[]); // expected-error {{array size must be specified in new expressions}}
+ (void)new int&; // expected-error {{cannot allocate reference type 'int &' with new}}
+ (void)new (void ()); // expected-error {{cannot allocate function type 'void (void)' with new}}
// Some lacking cases due to lack of sema support.
}