Closed nenadv closed 10 years ago
gary-funck added the following under upc2c issue:
After running tests against a recent head revision, seeing this test failure:
[ RUN ] RecursiveASTVisitor.VisitsCompoundLiteralType
error: invalid argument '-std=c99' not allowed with 'C++/ObjC++'
/eng/upc/dev/gary/clang/src/llvm/tools/clang/unittests/Tooling/RecursiveASTVisi
torTest.cpp:530: Failure
Value of: Visitor.runOver( "int f() { return (struct S { int a; }){.a = 0}.a; }
", TypeLocVisitor::Lang_C)
Actual: false
Expected: true
/eng/upc/dev/gary/clang/src/llvm/tools/clang/unittests/Tooling/TestVisitor.h:20
5: Failure
Value of: Found
Actual: false
Expected: true
Expected "struct S" at 1:26
[ FAILED ] RecursiveASTVisitor.VisitsCompoundLiteralType (3 ms)
Ran bisect on this and came up with the following commit which triggers the failure: https://github.com/Intrepid/clang-upc/commit/a8b05615807e6b3f88631b88e59d1484b6f5f5eb
Steps to reproduce:
cd bld/tools/clang
make -j >& make.log
make -C unittests/Tooling ToolingTests >& make-test.log
unittests/Tooling/ToolingTests >& test.log
On 02/26/2014 11:41 AM, Nenad Vukicevic wrote:
[ RUN ] RecursiveASTVisitor.VisitsCompoundLiteralType error: invalid argument '-std=c99' not allowed with 'C++/ObjC++' /eng/upc/dev/gary/clang/src/llvm/tools/clang/unittests/Tooling/RecursiveASTVisi torTest.cpp:530: Failure Value of: Visitor.runOver( "int f() { return (struct S { int a; }){.a = 0}.a; } ", TypeLocVisitor::Lang_C)
This looks like a bug in the test case, which was exposed by my fix. (Previously errors in command line arguments were ignored.)
The following test produces an error:
I think this is the reported error:
error: invalid argument '-std=c99' not allowed with 'C++/ObjC++'