timshen updated this revision to Diff 86377.
timshen added a comment.
ActOnFinishFullExpr after exiting the expression evaluation context.
https://reviews.llvm.org/D24333
Files:
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/lib/Sema/TreeTransform.h
clang/test/Sema/pr30306.cpp
timshen updated this revision to Diff 86375.
timshen added a comment.
Fix in the right way as rsmith pointed out.
https://reviews.llvm.org/D24333
Files:
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/lib/Sema/TreeTransform.h
clang/test/Sema/pr30306.cpp
Index:
rsmith added inline comments.
Comment at: clang/test/SemaCXX/pr30306.cpp:5
+template
+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
timshen updated this revision to Diff 70667.
timshen added a comment.
Update the test file name and remove unused code.
https://reviews.llvm.org/D24333
Files:
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/test/SemaCXX/pr30306.cpp
Index:
timshen created this revision.
timshen added a reviewer: rsmith.
timshen added a subscriber: cfe-commits.
Before r272296, the assertion was !ExprNeedsCleanups, which means that there is
no cleanups (with dtor calls). It should still check so after r272296. This
fixes pr30306.