[LLVMbugs] [Bug 18116] New: Consider warning on unintentional uses of the comma operator

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Dec 2 12:49:59 PST 2013


            Bug ID: 18116
           Summary: Consider warning on unintentional uses of the comma
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11647
  --> http://llvm.org/bugs/attachment.cgi?id=11647&action=edit
prototype patch

In v8, some code called

   v8::Debug::SetLiveEditEnabled(false), env->GetIsolate();

when it meant to call

   v8::Debug::SetLiveEditEnabled(false, env->GetIsolate());

(SetLiveEditEnabled() has a default parameter for the 2nd argument)

A possible warning would be to check if the lhs of a comma operator is a call
and the call is still valid when adding the rhs to the call arguments. The
attached patch implements this idea – but it doesn't catch the same thing for
overloads, and it didn't find any other bugs in chromium, so I'm not sure if
it's worth it. I'm attaching the patch if someone else wants to do something
with it.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131202/06427aea/attachment.html>

More information about the llvm-bugs mailing list