summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/cpp11-migrate/UseNullptr/UseNullptr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* cpp11-migrate: Transforms collect timing data.Edwin Vane2013-05-301-1/+2
| | | | | | | | | | Using updated form of newFrontendActionFactory(), Transforms now automatically measure, if requested, how long it takes to apply a MatchFinder to a source file. Other per-transform overhead, e.g. applying replacements, is not currently measured. This behaviour is disabled for now and soon will be connected to a new command line arg. llvm-svn: 182942
* Refactor Usenullptr matcher to avoid duplicationAriel J. Bernal2013-04-011-1/+0
| | | | | | | | | | | Previously UseNullptr matched separately implicit and explicit casts to nullptr, now it matches casts that either are implict casts to nullptr or have an implicit cast to nullptr within. Also fixes PR15572 since the same macro replacement logic is applied to implicit and explicit casts. llvm-svn: 178494
* Added summary option to cpp11-migrate toolDmitri Gribenko2013-03-051-3/+1
| | | | | | | | | Added a summary option that enables output to stdout counting the number of changes each transform has accepted, rejected or deferred. Patch by Ariel Bernal. llvm-svn: 176465
* Propagate changes through no-op transformsEdwin Vane2013-02-151-1/+1
| | | | | | | | | | | Currently, changes made by previous transforms are not kept if a transform doesn't make any changes itself to a given file. Now file states are propagated properly through transforms that don't make changes. Fixes: PR15281 Author: Jack Yang <jack.yang@intel.com> Reviewer: klimek llvm-svn: 175288
* Fix for combined loop and nullptr convert testsEdwin Vane2013-02-071-1/+1
| | | | | | | | | | | | The rewriter was previously reading the content buffer from the file itself. Since we are now keeping the content in memory and writing to the file only once, the rewriter's buffer (from the file) was not in sync with the RefactoringTool's buffer. Adding an overrideFileContents call (similar to how Clang-format handles for this) will resolve this issue. Author: Jack Yang <jack.yang@intel.com> Reviewers: gribozavr, klimek llvm-svn: 174643
* Add use-nullptr transform to cpp11-migrateEdwin Vane2013-01-221-0/+68
This transform converts the usage of null pointer constants (e.g. NULL, 0, etc.) in legacy C++ code and converts them to use the new C++11 nullptr keyword. - Added use-nullptr transform. - Added C++11 support to the final syntax check. Used ArgumentAdjuster class to add -std=c++11 option to the command line options. - Added tests for use-nullptr transform. - Added tests that exercises both loop-convert and use-nullptr in the source file. TODO: There's a known bug when using both -loop-convert and -use-nullptr at the same time. Author: Tareq A Siraj <tareq.a.siraj@intel.com> Reviewers: klimek, gribozavr llvm-svn: 173178
OpenPOWER on IntegriCloud