From 6e4b594b545134588e982f219d96067972cc166c Mon Sep 17 00:00:00 2001 From: scroggo Date: Wed, 9 Nov 2016 12:03:17 -0800 Subject: Revert of added constant folding & branch elimination to skslc (patchset #3 id:40001 of https://codereview.chromium.org/2489673002/ ) Reason for revert: Breaking the DEPS roll: ../../third_party/skia/src/sksl/SkSLIRGenerator.cpp:257:70: error: chosen constructor is explicit in copy-initialization return std::unique_ptr(new Block(s.fPosition, { }, fSymbolTable)); ^~~ ../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/debug/vector:77:7: note: constructor declared here vector(const _Allocator& __a = _Allocator()) ^ ../../third_party/skia/src/sksl/ir/SkSLBlock.h:20:70: note: passing argument to parameter 'statements' here Block(Position position, std::vector> statements, ^ Original issue's description: > added constant folding & branch elimination to skslc > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2489673002 > > Committed: https://skia.googlesource.com/skia/+/6136310ee8f43247548bcefcaeca6d43023c10aa TBR=benjaminwagner@google.com,bsalomon@google.com,ethannicholas@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2494523002 --- tests/SkSLErrorTest.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'tests/SkSLErrorTest.cpp') diff --git a/tests/SkSLErrorTest.cpp b/tests/SkSLErrorTest.cpp index fc20fa2e6d..9e89b71473 100644 --- a/tests/SkSLErrorTest.cpp +++ b/tests/SkSLErrorTest.cpp @@ -352,19 +352,3 @@ DEF_TEST(SkSLContinueOutsideLoop, r) { "void foo() { for(;;); continue; }", "error: 1: continue statement must be inside a loop\n1 error\n"); } - -DEF_TEST(SkSLStaticIfError, r) { - // ensure eliminated branch of static if / ternary is still checked for errors - test_failure(r, - "void foo() { if (true); else x = 5; }", - "error: 1: unknown identifier 'x'\n1 error\n"); - test_failure(r, - "void foo() { if (false) x = 5; }", - "error: 1: unknown identifier 'x'\n1 error\n"); - test_failure(r, - "void foo() { true ? 5 : x; }", - "error: 1: unknown identifier 'x'\n1 error\n"); - test_failure(r, - "void foo() { false ? x : 5; }", - "error: 1: unknown identifier 'x'\n1 error\n"); -} -- cgit v1.2.3