[cfe-dev] Test Design

John Freeman jfreeman at cse.tamu.edu
Fri Jul 15 13:02:54 PDT 2011

How are tests designed in Clang? More specifically:

- How should a test file be named?

For tests in CXX/, it seems to be named after a paragraph in the 
standard, with "-0x" for C++0x feature testing, and placed in a 
directory named after the section in the standard. If so, what document 
are we using for the C++0x standard? I thought it might be N3242, but 
there is a test named clang/test/CXX/expr/expr.prim/p12-0x.cpp, and I 
don't see a paragraph 12 in section 5.1 [expr.prim].

- What should go in the test?

For C++, I'm guessing we test parsing diagnostics in CXX/ and sema 
diagnostics in SemaCXX/?
Most tests in CXX/ are run with "-fsyntax-only -verify", but some 
aren't. How do I determine the best way to run the test?

More information about the cfe-dev mailing list