- Nov 18, 2016
-
-
Haojian Wu authored
Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26844 llvm-svn: 287330
-
- Nov 17, 2016
-
-
Benjamin Kramer authored
llvm-svn: 287230
-
Benjamin Kramer authored
- Refactor the external sema source into a visible class - Add support for emitting FixIts - Wrap up include fixer as a plugin as I did with clang-tidy Test case will follow as soon as I wire this up in libclang. Differential Revision: https://reviews.llvm.org/D26752 llvm-svn: 287228
-
Malcolm Parsons authored
Reviewers: aaron.ballman Subscribers: nemanjai, cfe-commits Differential Revision: https://reviews.llvm.org/D26798 llvm-svn: 287226
-
Malcolm Parsons authored
Summary: Template instantiations were causing misplaced fixits. Reviewers: aaron.ballman, alexfh, hokein Subscribers: hokein, cfe-commits Differential Revision: https://reviews.llvm.org/D26751 llvm-svn: 287221
-
Malcolm Parsons authored
Summary: Warn about special member functions that only contain a comment. Report the location of the special member function, unless it is defined in a macro. Reporting the location of the body in a macro is more helpful as it causes the macro expansion location to be reported too. Fixes PR30920. Reviewers: alexfh, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26741 llvm-svn: 287215
-
- Nov 16, 2016
-
-
Eric Fiselier authored
Summary: This patch adds handling for member initializers in a constructors initializer list. Previously we only handled base-class and delegating initializers, which are transformed by the `TypeLoc` matcher. For Example: ``` // Style options: All identifiers should start with an upper case letter. struct base { ... }; struct der : base { int field; // FIXES: int Field; der() : der(42) {} // FIXES: Der() : Der(42) {} der(int X) : base(), field(X) {} // FIXES: Der(int X) : Base(), field(X) // Note that `field` doesn't get replaced }; ``` Reviewers: alexfh, hokein, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26744 llvm-svn: 287153
-
Eric Liu authored
[change-namespace] handle constructor initializer: Derived : Base::Base() {} and added conflict detections Summary: namespace nx { namespace ny { class Base { public: Base(i) {}} } } namespace na { namespace nb { class X : public nx::ny { public: X() : Base::Base(1) {} }; } } When changing from na::nb to x::y, "Base::Base" will be changed to "nx::ny::Base" and "Base::" in "Base::Base" will be replaced with "nx::ny::Base" too, which causes conflict. This conflict should've been detected when adding replacements but was hidden by `addOrMergeReplacement`. We now also detect conflict when adding replacements where conflict must not happen. The namespace lookup is tricky here, we simply replace "Base::Base()" with "nx::ny::Base()" as a workaround, which compiles but not perfect. Reviewers: hokein Subscribers: bkramer, cfe-commits Differential Revision: https://reviews.llvm.org/D26637 llvm-svn: 287118
-
Gabor Horvath authored
llvm-svn: 287107
-
Haojian Wu authored
Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26665 llvm-svn: 287101
-
Malcolm Parsons authored
Summary: Duplicate fixes were being created for explicit template instantiations of out-of-line constructors or destructors. Fixes PR30921. Reviewers: alexfh, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26582 llvm-svn: 287091
-
- Nov 15, 2016
-
-
Malcolm Parsons authored
Summary: Fixes PR30835 Reviewers: alexfh, hokein, aaron.ballman Subscribers: Prazek, cfe-commits Differential Revision: https://reviews.llvm.org/D26118 llvm-svn: 286990
-
Haojian Wu authored
Summary: Add decent blank lines between declarations: * Add extra blank line after #define or #includes. * Add extra blank line between declarations. * Add extra blank line in front of #endif. Previously, the new generated code is quite tight: ``` #ifndef FOO_H #define FOO_H namespace a { class A { public: int f(); }; int A::f() { return 0; } } // namespace a #endif // FOO_H ``` After this patch, the code looks like: ``` #ifndef FOO_H #define FOO_H namespace a { class A { public: int f(); }; int A::f() { return 0; } } // namespace a #endif // FOO_H ``` Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26493 llvm-svn: 286943
-
- Nov 14, 2016
-
-
Eric Liu authored
Summary: If a TypeLoc refers to a type alias defined in the moved namespace, we do not need to update its specifier since the type alias decl will be moved along with the type reference. Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26592 llvm-svn: 286873
-
Haojian Wu authored
Summary: Fix an incorrect range for the functions whose returned value is a macro (e.g. `bool`). This incorrect range can lead to modifications of an unexpected file where the macro is in. We should use expansion location instead of spelling location. Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26609 llvm-svn: 286833
-
Haojian Wu authored
Summary: No functionality change. This is a refactoring patch, which makes the code more readable and easy to extend it to support more types. Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26515 llvm-svn: 286825
-
- Nov 10, 2016
-
-
Eric Liu authored
Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26456 llvm-svn: 286486
-
Eric Liu authored
llvm-svn: 286485
-
Malcolm Parsons authored
Summary: Fixes PR27872 Reviewers: klimek, hokein, alexfh, aaron.ballman Subscribers: Prazek, Eugene.Zelenko, danielmarjamaki, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D26138 llvm-svn: 286472
-
Malcolm Parsons authored
llvm-svn: 286466
-
Simon Pilgrim authored
llvm-svn: 286449
-
Haojian Wu authored
Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26423 llvm-svn: 286427
-
Felix Berger authored
Summary: Suppress fixes for functions that are referenced within the compilation unit outside of a call expression as the signature change could break the code referencing the function. We still issue a warning in this case so that users can decide to manually change the function signature. Reviewers: alexfh, sbenza, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26203 llvm-svn: 286424
-
- Nov 09, 2016
-
-
Alexander Kornienko authored
llvm-svn: 286404
-
Alexander Kornienko authored
llvm-svn: 286390
-
Philipp Stephani authored
"allow" requires a direct object in this case. llvm-svn: 286381
-
- Nov 08, 2016
-
-
Eric Liu authored
Summary: when replacing symbol references in moved namespaces, trying to make the replace name as short as possible by considering UsingDecl (i.e. UsingShadow) and UsingDirectiveDecl (i.e. using namespace decl). Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25771 llvm-svn: 286307
-
Haojian Wu authored
Summary: When moving all code to new.h/cc, these code also will be formatted based on the given code style. Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26236 llvm-svn: 286281
-
Alexander Kornienko authored
llvm-svn: 286257
-
Kirill Bobyrev authored
-Start using argparse instead of mimicking CLI parsing. -PEPify the code. -Decrease the number of imports by slightly cleaning up the script. Reviewers: alexfh Differential Revision: https://reviews.llvm.org/D25074 llvm-svn: 286228
-
Alexander Kornienko authored
llvm-svn: 286222
-
Mandeep Singh Grang authored
Summary: Ran clang-format on all .c/.cpp/.h files in clang-tools-extra. Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories. Reviewers: klimek, alexfh Subscribers: nemanjai Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D26329 llvm-svn: 286221
-
Alexander Kornienko authored
Summary: Depends on D26310. Reviewers: zaks.anna, hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26311 llvm-svn: 286219
-
Alexander Kornienko authored
llvm-svn: 286213
-
Haojian Wu authored
Summary: This will prevent the check warning the variables which have been implicitly added by compiler, like the following case (in for-range loop): the variable '__end' is copy-constructed from a const reference... Reviewers: alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25911 llvm-svn: 286186
-
- Nov 07, 2016
-
-
Haojian Wu authored
Summary: r285239 changes the behavior of AST CXXDefaultArgExpr node. Update `modernize-use-nullptr` to handle CXXDefaultArgExpr correctly. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26301 llvm-svn: 286156
-
Felix Berger authored
Summary: Move in complete type test which does not compile into its own test file. Reviewers: alexfh, sbenza, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26369 llvm-svn: 286155
-
- Nov 04, 2016
-
-
Felix Berger authored
[ClangTidy - performance-unnecessary-value-param] Only add "const" when current parameter is not already const qualified Reviewers: alexfh, sbenza, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26207 llvm-svn: 286010
-
Felix Berger authored
Summary: IsExpensiveToCopy can return false positives for incomplete types, so ignore them. All existing ClangTidy tests that depend on this function still pass as the types are complete. Reviewers: alexfh, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26195 llvm-svn: 286008
-
Malcolm Parsons authored
Summary: Fix generated by this check changed program semantics in the case where 'if' was a part (direct child) of other statement. Fixes PR30652. Patch by Paweł Żukowski. Reviewers: malcolm.parsons, alexfh, djasper Subscribers: mgehre, omtcyfz, cfe-commits Differential Revision: https://reviews.llvm.org/D26125 llvm-svn: 285999
-