summaryrefslogtreecommitdiff
path: root/tools/c-arcmt-test/c-arcmt-test.c
Commit message (Collapse)AuthorAge
* Fix C++ style // comments in a couple of C filesTimur Iskhodzhanov2014-06-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210325 91177308-0d34-0410-b5e6-96231b3b80d8
* Flush C stdio streams upon process terminationReid Kleckner2014-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to what can only be described as a CRT bug, stdout and amazingly even stderr are not always flushed upon process termination, especially when the system is under high threading pressure. I have found two repros for this: 1) In lib\Support\Threading.cpp, change sys::Mutex to an std::recursive_mutex and run check-clang. Usually between 30 and 40 tests will fail. 2) Add OutputDebugStrings in code that runs during static initialization and static shutdown. This will sometimes generate similar failures. After a substantial amount of troubleshooting and debugging, I found that I could reproduce this from the command line without running check-clang. Simply make the mutex change described in #1, then manually run the following command many times by running it once, then pressing Up -> Enter very quickly: D:\src\llvm\build\vs2013\Debug\bin\c-index-test.EXE -cursor-at=D:\src\llvm\tools\clang\test\Index\targeted-preamble.h:2:15 D:\src\llvm\tools\clang\test\Index\targeted-cursor.c -include D:\src\llvm\build\vs2013\tools\clang\test\Index\Output\targeted-cursor.c.tmp.h -Xclang -error-on-deserialized-decl=NestedVar1 -Xclang -error-on-deserialized-decl=TopVar | D:\src\llvm\build\vs2013\Debug\bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Index\targeted-cursor.c -check-prefix=PREAMBLE-CURSOR1 Sporadically they will fail, and attaching a debugger to a failed instance indicates that stdin of FileCheck.exe is empty. Note that due to the repro in #2, we can rule out a bug in the STL's mutex implementation, and instead conclude that this is a real flake in the windows test harness. Test Plan: Without patch: Ran check-clang 10 times and saw over 30 Unexpected failures on every run. With patch: Ran check-clang 10 times and saw 0 unexpected failures across all runs. Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4021 Patch by Zachary Turner! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210225 91177308-0d34-0410-b5e6-96231b3b80d8
* [Cygwin] Work around to flush stdout in a thread, or stdout in threads won't ↵NAKAMURA Takumi2012-04-07
| | | | | | be flushed at exit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154254 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-06
| | | | | | | | | | | the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152141 91177308-0d34-0410-b5e6-96231b3b80d8
* [arcmt] Move the remapping functions to clang-c/Index.h and change 'arcmt_' ↵Argyrios Kyrtzidis2011-07-11
| | | | | | prefix to 'clang_'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134916 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ARCMT/migrate.m on MSVC. Francois Pichet2011-07-10
| | | | | | Solution is to set output stdout to binary mode to prevent newline conversion (\n => \r\n). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134879 91177308-0d34-0410-b5e6-96231b3b80d8
* c-arcmt-test.c: MSVCRT does not have setenv. Use putenv instead.NAKAMURA Takumi2011-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134859 91177308-0d34-0410-b5e6-96231b3b80d8
* [arcmt] Introduce new '-ccc-arcmt-migrate <path>' ARC migration driver option.Argyrios Kyrtzidis2011-07-09
This is a new mode of migration, where we avoid modifying the original files but we emit temporary files instead. <path> will be used to keep migration process metadata. Currently the temporary files that are produced are put in the system's temp directory but we can put them in the <path> if is necessary. Also introduce new ARC migration functions in libclang whose only purpose, currently, is to accept <path> and provide pairs of original file/transformed file to map from the originals to the files after transformations are applied. Finally introduce the c-arcmt-test utility that exercises the new libclang functions, update arcmt-test, and add tests for the whole process. rdar://9735086. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134844 91177308-0d34-0410-b5e6-96231b3b80d8