llvm-project/clang-tools-extra/cpp11-migrate
Edwin Vane eeed39a583 Use 'auto' with 'new' expressions
For variable declarations initialized with new expressions, use 'auto' for the
type specifier.

The 'auto' replacement happens only when the type of the VarDecl exactly
matches the type of the initializer and the VarDecl is *not* CV-qualified. The
only case that is currently handled is if the pointer type of the VarDecl is
itself CV qualified.

Some improvements need to be made to Clang's TypeLoc information in order for
other CV qualifier cases to be successfully handled. See the new test suite
new_cv_failing.cpp for examples of usages that could be handled with such an
improvement.

Function pointers are, for now, not transformed until the identifier info can
be extracted.

Reviewer: klimek
llvm-svn: 178575
2013-04-02 20:43:57 +00:00
..
LoopConvert Improve loop convert's variable aliasing 2013-04-01 18:15:06 +00:00
UseAuto Use 'auto' with 'new' expressions 2013-04-02 20:43:57 +00:00
UseNullptr Refactor Usenullptr matcher to avoid duplication 2013-04-01 20:09:29 +00:00
CMakeLists.txt Adding clang-headers as dependency of cpp11-migrate 2013-03-25 15:19:43 +00:00
Cpp11Migrate.cpp Fixing Doxygen warnings in cpp11-migrate 2013-03-08 19:12:12 +00:00
Makefile Introducing Use-Auto transform for cpp11-migrate 2013-02-28 16:29:24 +00:00
Transform.cpp Propagate changes through no-op transforms 2013-02-15 19:38:28 +00:00
Transform.h Added summary option to cpp11-migrate tool 2013-03-05 00:12:33 +00:00
Transforms.cpp Introducing Use-Auto transform for cpp11-migrate 2013-02-28 16:29:24 +00:00
Transforms.h Allow users to specify NULL like macros to be replaced 2013-03-28 16:06:59 +00:00