[clang-tidy] Fix a bug in UseNullptrCheck.

http://reviews.llvm.org/D12162

Patch by Angel Garcia!


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@245471 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alexander Kornienko 2015-08-19 17:50:22 +00:00
Родитель be2c671327
Коммит 474d21c110
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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;