Chris Lattner wrote: > > On Mar 9, 2008, at 3:06 PM, Török Edwin wrote: > >> Hi, >> >> I have run make test on Linux (x86 and x86-64) for the first time, and >> here are the results: >> [ignoring the Rewriter failures on x86, since I don't have objc headers >> installed there] > > Is this from mainline? None of the rewriter tests use objc.h anymore.
$ grep objc.h Driver/RewriteTest.cpp "#include <objc/objc.h>\n" // declared in <objc/objc.h> $ svn info Driver/RewriteTest.cpp Path: Driver/RewriteTest.cpp Name: RewriteTest.cpp URL: http://llvm.org/svn/llvm-project/cfe/trunk/Driver/RewriteTest.cpp Repository Root: http://llvm.org/svn/llvm-project Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8 Revision: 48138 Node Kind: file Schedule: normal Last Changed Author: lattner Last Changed Rev: 47954 Last Changed Date: 2008-03-05 20:54:05 +0200 (Wed, 05 Mar 2008) Text Last Updated: 2008-03-09 17:25:07 +0200 (Sun, 09 Mar 2008) Checksum: cf794ea4033018e82aed8dfc8835de7d Isn't this the latest SVN version of clang? Am I missing something? If I remove gobjc-4.2 I get failure like this: Command: clang -rewrite-test Rewriter/undef-field-reference-1.m | clang Output: <stdin>:23:10: error: 'objc/objc.h' file not found #include <objc/objc.h> ^ <stdin>:27:2: error: type name requires a specifier or qualifier id *itemsPtr; ^ <stdin>:27:5: error: expected ';' at end of declaration list id *itemsPtr; ^ 3 diagnostics generated If I have gobjc-4.2 installed, and set include path to use it, I get a different failure: Command: clang -rewrite-test Rewriter/undef-field-reference-1.m | clang Output: clang[0x69b126] /lib/libc.so.6[0x3932831f70] clang(_ZN5clang12HeaderSearch11getFileInfoEPKNS_9FileEntryE+0xc)[0x5a68bc] clang(_ZN5clang4Sema16MergeTypeDefDeclEPNS_11TypedefDeclEPNS_10ScopedDeclE+0x192)[0x524332] clang(_ZN5clang4Sema15ActOnDeclaratorEPNS_5ScopeERNS_10DeclaratorEPv+0x86d)[0x52b0fd] clang(_ZN5clang6Parser43ParseInitDeclaratorListAfterFirstDeclaratorERNS_10DeclaratorE+0x60)[0x590990] clang(_ZN5clang6Parser22ParseSimpleDeclarationEj+0x1d0)[0x5923a0] clang(_ZN5clang6Parser24ParseExternalDeclarationEv+0x17f)[0x58c75f] clang(_ZN5clang6Parser17ParseTopLevelDeclERPv+0x1d)[0x58c99d] clang(_ZN5clang8ParseASTERNS_12PreprocessorEPNS_11ASTConsumerEb+0x42b)[0x51f86b] clang[0x4adf9f] clang(main+0x8f1)[0x4b05a1] /lib/libc.so.6(__libc_start_main+0xfa)[0x393281e1ea] clang[0x491949] Output/Rewriter/undef-field-reference-1.m.out.script: line 1: 10835 Done clang -rewrite-test Rewriter/undef-field-reference-1.m 10836 Segmentation fault | clang This looks like a problem when clang is reading the file from stdin, because FE is NULL here: HeaderSearch::PerFileInfo &HeaderSearch::getFileInfo(const FileEntry *FE) This patch avoids this: Index: include/clang/Lex/HeaderSearch.h =================================================================== --- include/clang/Lex/HeaderSearch.h (revision 48138) +++ include/clang/Lex/HeaderSearch.h (working copy) @@ -156,7 +156,7 @@ /// getFileDirFlavor - Return whether the specified file is a normal header, /// a system header, or a C++ friendly system header. DirectoryLookup::DirType getFileDirFlavor(const FileEntry *File) { - return DirectoryLookup::DirType(getFileInfo(File).DirInfo); + return File ? DirectoryLookup::DirType(getFileInfo(File).DirInfo) : DirectoryLookup::NormalHeaderDir; } /// MarkFileIncludeOnce - Mark the specified file as a "once only" file, e.g. > >> If you want preprocessed sources for any of the below, let me know and >> I'll open a bugreport for them. >> >> This is on x86 Linux: >> ******************** TEST 'Lexer/digraph.cpp' FAILED! >> ******************** >> ******************** TEST 'Lexer/digraph.cpp' FAILED! >> ******************** > > This looks like a failure to parse your system stdio.h file. I think > this is just because we haven't implemented C++ rules for tag lookup yet. > > >> This is on x86-64 Linux: >> ******************** TEST 'Rewriter/undef-field-reference-1.m' FAILED! > > This isn't from mainline. typedef.c doesn't exist anymore. For some reason that file was left behind: $ svn status test/Sema/typedef.c ? test/Sema/typedef.c I removed the leftover files, updated clang, and rerun the tests: $ svn info Path: . URL: http://llvm.org/svn/llvm-project/cfe/trunk Repository Root: http://llvm.org/svn/llvm-project Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8 Revision: 48138 Node Kind: directory Schedule: normal Last Changed Author: lattner Last Changed Rev: 48131 Last Changed Date: 2008-03-10 08:20:22 +0200 (Mon, 10 Mar 2008) $ make test 2>&1|grep FAIL|sort -u ******************** TEST 'CodeGen/mandel.c' FAILED! ******************** ******************** TEST 'Lexer/digraph.cpp' FAILED! ******************** ******************** TEST 'Rewriter/id-test-3.m' FAILED! ******************** ******************** TEST 'Rewriter/objc-encoding-bug-1.m' FAILED! ******************** ******************** TEST 'Rewriter/objc-super-test.m' FAILED! ******************** ******************** TEST 'Rewriter/objc-synchronized-1.m' FAILED! ******************** ******************** TEST 'Rewriter/protocol-rewrite-1.m' FAILED! ******************** ******************** TEST 'Rewriter/rewrite-foreach-1.m' FAILED! ******************** ******************** TEST 'Rewriter/rewrite-foreach-2.m' FAILED! ******************** ******************** TEST 'Rewriter/rewrite-foreach-3.m' FAILED! ******************** ******************** TEST 'Rewriter/rewrite-foreach-4.m' FAILED! ******************** ******************** TEST 'Rewriter/rewrite-foreach-5.m' FAILED! ******************** ******************** TEST 'Rewriter/rewrite-protocol-type-1.m' FAILED! ******************** ******************** TEST 'Rewriter/rewrite-try-catch.m' FAILED! ******************** ******************** TEST 'Rewriter/undecl-objc-h.m' FAILED! ******************** ******************** TEST 'Rewriter/undef-field-reference-1.m' FAILED! ******************** ******************** TEST 'Rewriter/va-method.m' FAILED! ******************** If I apply my patch I get only the known failures: $ make test 2>&1|grep FAIL|sort -u ******************** TEST 'CodeGen/mandel.c' FAILED! ******************** ******************** TEST 'Lexer/digraph.cpp' FAILED! ******************** Best regards, --Edwin _______________________________________________ cfe-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
