summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/new-delete.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-11-03 17:52:57 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-11-03 17:52:57 +0000
commit07e97c594d4928a5cdf453aea42d361406bd8ba0 (patch)
tree5d2cd77764b3f01aa102796094c0ad66e7c6793e /clang/test/SemaCXX/new-delete.cpp
parent0a5f9c96fd988b42d4e6bf8626e302e6d91eee37 (diff)
downloadbcm5719-llvm-07e97c594d4928a5cdf453aea42d361406bd8ba0.tar.gz
bcm5719-llvm-07e97c594d4928a5cdf453aea42d361406bd8ba0.zip
Make this error less specific but also less likely to cause confusion. Fixes
PR7702. llvm-svn: 118181
Diffstat (limited to 'clang/test/SemaCXX/new-delete.cpp')
-rw-r--r--clang/test/SemaCXX/new-delete.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/new-delete.cpp b/clang/test/SemaCXX/new-delete.cpp
index f6129d19841..19d5df6673e 100644
--- a/clang/test/SemaCXX/new-delete.cpp
+++ b/clang/test/SemaCXX/new-delete.cpp
@@ -62,8 +62,8 @@ struct abstract {
void bad_news(int *ip)
{
int i = 1;
- (void)new; // expected-error {{missing type specifier}}
- (void)new 4; // expected-error {{missing type specifier}}
+ (void)new; // expected-error {{expected a type}}
+ (void)new 4; // expected-error {{expected a type}}
(void)new () int; // expected-error {{expected expression}}
(void)new int[1.1]; // expected-error {{array size expression must have integral or enumerated type, not 'double'}}
(void)new int[1][i]; // expected-error {{only the first dimension}}
@@ -372,3 +372,9 @@ namespace PairedDelete {
return new A<int>();
}
}
+
+namespace PR7702 {
+ void test1() {
+ new DoesNotExist; // expected-error {{expected a type}}
+ }
+}
OpenPOWER on IntegriCloud