[PATCH] D24333: [CleanupInfo] Use cleanupsHaveSideEffects instead of exprNeedsCleanups in assertions

2017-01-30 Thread Tim Shen via Phabricator via cfe-commits
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

[PATCH] D24333: [CleanupInfo] Use cleanupsHaveSideEffects instead of exprNeedsCleanups in assertions

2017-01-30 Thread Tim Shen via Phabricator via cfe-commits
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:

[PATCH] D24333: [CleanupInfo] Use cleanupsHaveSideEffects instead of exprNeedsCleanups in assertions

2017-01-30 Thread Richard Smith via Phabricator via cfe-commits
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

Re: [PATCH] D24333: [CleanupInfo] Use cleanupsHaveSideEffects instead of exprNeedsCleanups in assertions

2016-09-08 Thread Tim Shen via cfe-commits
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:

[PATCH] D24333: [CleanupInfo] Use cleanupsHaveSideEffects instead of exprNeedsCleanups in assertions

2016-09-08 Thread Tim Shen via cfe-commits
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.