mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Bug 1316545 part 5 - Make misuseX() concrete such that the AST is computed even if it is unused. r=mystor
MozReview-Commit-ID: 4kkWJjvATzC --HG-- extra : histedit_source : dedc8935c4dfe513f2a266e31c34eab03f897c71
This commit is contained in:
parent
4941450f3f
commit
a008dced39
@ -21,8 +21,7 @@ T *customAlloc() MOZ_HEAP_ALLOCATOR {
|
||||
return new (arg) T();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void misuseX(T q) {
|
||||
void misuseX() {
|
||||
X *foo = customAlloc<X>(); // expected-error {{variable of type 'X' is not valid on the heap}} expected-note {{value incorrectly allocated on the heap}}
|
||||
X *foo2 = new (100) X(); // expected-error {{variable of type 'X' is not valid on the heap}} expected-note {{value incorrectly allocated on the heap}}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user