[clang-tools-extra] r245471 - [clang-tidy] Fix a bug in UseNullptrCheck.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 19 10:50:23 PDT 2015


Author: alexfh
Date: Wed Aug 19 12:50:22 2015
New Revision: 245471

URL: http://llvm.org/viewvc/llvm-project?rev=245471&view=rev
Log:
[clang-tidy] Fix a bug in UseNullptrCheck.

http://reviews.llvm.org/D12162

Patch by Angel Garcia!

Modified:
    clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp

Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp?rev=245471&r1=245470&r2=245471&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp Wed Aug 19 12:50:22 2015
@@ -175,10 +175,10 @@ private:
 class CastSequenceVisitor : public RecursiveASTVisitor<CastSequenceVisitor> {
 public:
   CastSequenceVisitor(ASTContext &Context,
-                      SmallVector<StringRef, 1> UserNullMacros,
+                      ArrayRef<StringRef> UserNullMacros,
                       ClangTidyCheck &check)
       : SM(Context.getSourceManager()), Context(Context),
-        UserNullMacros(std::move(UserNullMacros)), Check(check),
+        UserNullMacros(UserNullMacros), Check(check),
         FirstSubExpr(nullptr), PruneSubtree(false) {}
 
   bool TraverseStmt(Stmt *S) {
@@ -435,7 +435,7 @@ private:
 private:
   SourceManager &SM;
   ASTContext &Context;
-  const SmallVector<StringRef, 1> &UserNullMacros;
+  ArrayRef<StringRef> UserNullMacros;
   ClangTidyCheck &Check;
   Expr *FirstSubExpr;
   bool PruneSubtree;




More information about the cfe-commits mailing list