https://llvm.org/bugs/show_bug.cgi?id=28994
Bug ID: 28994 Summary: Clang spams a -Wunreachable-code warning for some Firefox code that it didn't warn about in 3.8 Product: clang Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: dholb...@mozilla.com CC: cpeter...@mozilla.com, dblai...@gmail.com, llvm-bugs@lists.llvm.org Classification: Unclassified I'm spinning this off to cover the behavior-difference between clang 3.8 vs 3.9 discussed in bug 28918. In the Firefox build process, we have some autogenerated C++ code[1] that looks like this: > JS::Rooted<JS::Value> rval(cx, JS::UndefinedValue()); > [SNIP] > if ((false) && !CallerSubsumes(rval)) { > ThrowErrorMessage(...etc...) In clang 3.8, this code compiles just fine. In clang 3.9, this code triggers an unreachable code warning for the ThrowErrorMessage call in clang 3.9. It should not, because the "false" in the if-condition is wrapped in parens, which is supposed to be a hint that Wunreachable-code warnings should be suppressed. My first attempt at minimizing a C++ testcase from this code produced something that caused the same issue in older clang revisions (and bug 28918 is filed on that long-standing bug) So, I'm still not exactly sure what exact conditions are involved in the 3.8-3.9 behavior-change here. HOWEVER, I did try bisecting the clang source to find the first SVN revision that exhibits the problem. That first revision is r273312: http://llvm.org/viewvc/llvm-project?view=revision&revision=273312 If I check out & build the previous revision of clang (273311), I do not encounter this error when building Firefox. But with 273312, I do encounter this error. [1] The autogenerated C++ code in question here is $OBJ/dom/bindings/TestCodeGenBinding.cpp ($OBJ is the object directory, i.e. where files generated by our build process end up) -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs