http://llvm.org/bugs/show_bug.cgi?id=21668

            Bug ID: 21668
           Summary: -Wpointer-bool-conversion doesn't work when the
                    attribute is on the parameter decl
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Consider:
__attribute__((nonnull(1))) int f(const char *p) {
  if (p) // warns
    return 1;
  return 0;
}

int g(__attribute__((nonnull)) const char *p) {
  if (p) // does not warn!
    return 1;
  return 0;
}

The test in test/CodeGen/nonnull.c suggests that this should work, but
apparently it does not?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to