[PATCH] D14560: [Clang] Fix Clang-tidy modernize-use-auto in some files in lib/AST; other minor cleanups.

Eugene Zelenko via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 11 14:15:21 PST 2015


Eugene.Zelenko added a comment.

I'm adept of consistency :-) It's also easier to fix all similar patterns in code then do such cleanups selectively. Actually, similar fixes were made recently in Decl.cpp when casts were involved, but not new.


================
Comment at: lib/AST/ASTContext.cpp:7930
@@ -7931,3 +7929,3 @@
 
-ASTMutationListener::~ASTMutationListener() { }
+ASTMutationListener::~ASTMutationListener() = default;
 
----------------
aaron.ballman wrote:
> This is... interesting. Explicitly defaulting an out-of-line function definition is not something I've ever encountered before. What benefit does this provide?
It's explicitly tells that destructor has default implementation.


Repository:
  rL LLVM

http://reviews.llvm.org/D14560





More information about the cfe-commits mailing list