[cfe-dev] POD struct

Matt Fowles matt.fowles at gmail.com
Tue Apr 10 20:15:41 PDT 2012


Eli~

Thanks for the pointer to the right place.  A patch is attached.

Matt

On Tue, Apr 10, 2012 at 10:59 PM, Eli Friedman <eli.friedman at gmail.com>wrote:

> On Tue, Apr 10, 2012 at 7:44 PM, Matt Fowles <matt.fowles at gmail.com>
> wrote:
> > Eli~
> >
> > I am interested in clang development and this seemed like an easy enough
> bug
> > to start with so I thought I would try it out.  I have managed to get
> llvm
> > checked out and building without problems.  I found the tests and have
> > turned the above example into a test in a new file
> > `test/SemaCXX/inner-pod-struct.cpp`.
> >
> > Unfortunately, I cannot figure out how to use lit.py properly.  I have
> > looked at
> >
> > http://clang.llvm.org/hacking.html#testingNonWindows
> >
> > but am a bit confused as it refers to non-existant files in several
> places.
> >  In particular,
> >
> >
> > python (path to llvm)\llvm\utils\lit\lit.py -sv
> >   --param=build_mode=Win32 --param=build_config=Debug
> >   --param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg
> >   (path to llvm)\llvm\tools\clang\test\(dir)\(test)
> >
> >
> > is giving me trouble.  On my machine, ~/dev/llvm is the llvm checkout and
> > ~/dev/llvm-build is the build dir.
> >
> > boots at eiji:~/dev/llvm-build$ find . -name lit.site.cfg
> > boots at eiji:~/dev/llvm-build$
> >
> >
> > Kind of a bust there, what about the llvm dir?
> >
> >
> > boots at eiji:~/dev/llvm$ find . -name lit.site.cfg
> > ./utils/lit/lit/ExampleTests/LLVM.InTree/test/lit.site.cfg
> > ./utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/lit.site.cfg
> > ./utils/lit/lit/ExampleTests.ObjDir/lit.site.cfg
> >
> >
> > Something at least.
> >
> >
> > boots at eiji:~/dev/llvm-build$ python ~/dev/llvm/utils/lit/lit.py
> >
> --param=clang_site_config=../llvm/./utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/lit.site.cfg
> > /Users/boots/dev/llvm/tools/clang/test/
> > -- Testing: 1 tests, 4 threads --
> > PASS: LLVM :: Foo/pct-S.ll (1 of 1)
> > Testing Time: 0.28s
> >   Expected Passes    : 1
> >
> >
> > But wait, that ran entirely the wrong tests?
> >
> >
> > boots at eiji:~/dev/llvm$ find . -name pct-S.ll
> > ./utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/Foo/pct-S.ll
> >
> >
> > ... Time passes while I hack and compose this email ...
> >
> > I discover that:
> >
> >
> > boots at eiji:~/dev/llvm-build$ cd tools/clang/
> > boots at eiji:~/dev/llvm-build/tools/clang$ make test
> > Making Clang 'lit.site.cfg' file...
> > Making Clang 'Unit/lit.site.cfg' file...
> > oots at eiji:~/dev/llvm-build/tools/clang/test$ python
> > ~/dev/llvm/utils/lit/lit.py --param=clang_site_config=lit.site.cfg
> > ~/dev/llvm/tools/clang/test/SemaCXX/inner-pod-struct.cpp
> > lit.py: lit.cfg:175: note: using clang:
> > '/Users/boots/dev/llvm-build/Release+Asserts/bin/clang'
> > -- Testing: 1 tests, 4 threads --
> > FAIL: Clang :: SemaCXX/inner-pod-struct.cpp (1 of 1)
> > Testing Time: 0.28s
> > ********************
> > Failing Tests (1):
> >     Clang :: SemaCXX/inner-pod-struct.cpp
> >
> >   Unexpected Failures: 1
> >
> >
> > Is the incantation I need.
> >
> > Can we expand the testing page slightly to include mention that you have
> to
> > run `make test` in the build/tools/clang directory to generate the cfg
> > files?
>
> Patch welcome.  (The relevant webpage is www/hacking.html in a clang
> checkout.)
>
> -Eli
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120410/fa711803/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hacking.patch
Type: application/octet-stream
Size: 1102 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120410/fa711803/attachment.obj>


More information about the cfe-dev mailing list