[cfe-dev] [patch] Some Path-related portability FIXME fixes

Gregory Curfman greg.curfman at gmail.com
Thu Jun 11 07:39:14 PDT 2009


Hi. I'd like to contribute a bit to the clang project and I thought a
good way to start would be to search for and repair some of the FIXME
items.  (This seemed a safer route initially, since I am looking at
fresh code rather than a possibly-stale bug/project list.) For my
first bit of work, I've attached two patches (one each for the llvm
and clang trees) which address a few of the llvm::sys::Path-related
portability issues.

Other that the obvious "fixes" I'd like to use this first exercise to
ensure that I have the patching mechanics and etiquette correct.  To
that end, I have a few questions and observations:

1. utils/mkpatch makes patches for the llvm tree.  I did not see the
moral equivalent for the tools/clang tree. Did I miss it?  In the
interim, I just followed the process in utils/mkpatch to make the
clang tree patch.

2. Given (1), it seemed reasonable to make two separate patches for
changes that hit both the llvm tree and the clang tree.

3. I attached each patch as a separate attachment.  Is this
acceptable, or do you prefer the patch(es) to be inline with the
e-mail text?

4. Is there a 'patching best practices" document for clang? If so, I
missed it.  If not, perhaps one would be helpful to new contributors.

5. Is there a style/coding document (or suggestions) for clang?  I
could infer quite a bit from reading the code base, but there were
some differences file to file. I'm fine with the "inferring" approach,
but if I've overlooked your style document, please point me to it. (I
didn't see anything in the clang Developer Documentation section.)

6. I used assert() to verify that non-NULL parameters were passed to
the new IsAbsolute functions.  Is this acceptable practice for clang
or is it too paranoid?

7. There is a windows change in the patch as well, but as I am running
on linux, I could only test it a bit by hacking it temporarily into
the unix version.

8. I ran the clang  "make test" checks, and they ran clean. Are there
any other existing test cases that I should be running?

Thanks.
Greg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm.path-portability.20090611.patch
Type: text/x-patch
Size: 1914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090611/e0a16c37/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.path-portability.20090611.patch
Type: text/x-patch
Size: 1769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090611/e0a16c37/attachment-0001.bin>


More information about the cfe-dev mailing list