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:
Ting-Yu Chou 2016-11-24 11:48:33 +08:00
parent 4941450f3f
commit a008dced39

View File

@ -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}}
}