rsmith added inline comments.
================ Comment at: clang/test/SemaCXX/pr30306.cpp:5 +template <typename T> +void g(T) { int a[f(3)]; } // expected-no-diagnostics + ---------------- Shouldn't we be (somehow) handling the cleanups from the array bound expression here -- either discarding them or attaching them to the array bound? Looks like `TreeTransform::TransformVariableArrayType` is missing a call to `ActOnFinishFullExpr`. If we modify the test to: ``` struct A { A(int); ~A(); }; int f(const A &); template<typename T> void g() { int a[f(3)]; } int main() { g<int>(); } ``` ... we need to register the `~A()` destructor to actually be run at some point. https://reviews.llvm.org/D24333 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits