https://bugs.llvm.org/show_bug.cgi?id=39223

            Bug ID: 39223
           Summary: invalid argument type 'int *' to unary expression:
                    provide fix-it to dereference it
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangb...@nondot.org
          Reporter: lebedev...@gmail.com
                CC: llvm-bugs@lists.llvm.org

int test(int *x) {
    return -x;
}
https://godbolt.org/z/BnCEY2

Expected:
int test(int *x) {
    return -(*x);
}

Would it make sense to provide such a fix-it?

-- 
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

Reply via email to