2013-07-08 20:17:37 +08:00
|
|
|
//===-- UseNullptr/NullptrMatchers.h - Matchers for null casts --*- C++ -*-===//
|
2013-01-23 02:31:49 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
///
|
2013-07-08 20:17:37 +08:00
|
|
|
/// \file
|
|
|
|
/// \brief This file contains the declarations for matcher-generating functions
|
|
|
|
/// and names for bound nodes found by AST matchers.
|
2013-01-23 02:31:49 +08:00
|
|
|
///
|
|
|
|
//===----------------------------------------------------------------------===//
|
2013-07-08 20:17:37 +08:00
|
|
|
|
2013-09-05 03:13:50 +08:00
|
|
|
#ifndef CLANG_MODERNIZE_USE_NULLPTR_MATCHERS_H
|
|
|
|
#define CLANG_MODERNIZE_USE_NULLPTR_MATCHERS_H
|
2013-01-23 02:31:49 +08:00
|
|
|
|
|
|
|
#include "clang/ASTMatchers/ASTMatchers.h"
|
|
|
|
|
|
|
|
// Names to bind with matched expressions.
|
|
|
|
extern const char *CastSequence;
|
|
|
|
|
2013-04-02 04:09:29 +08:00
|
|
|
/// \brief Create a matcher that finds implicit casts as well as the head of a
|
|
|
|
/// sequence of zero or more nested explicit casts that have an implicit cast
|
|
|
|
/// to null within.
|
|
|
|
/// Finding sequences of explict casts is necessary so that an entire sequence
|
|
|
|
/// can be replaced instead of just the inner-most implicit cast.
|
2013-01-23 02:31:49 +08:00
|
|
|
clang::ast_matchers::StatementMatcher makeCastSequenceMatcher();
|
|
|
|
|
2013-09-05 03:13:50 +08:00
|
|
|
#endif // CLANG_MODERNIZE_USE_NULLPTR_MATCHERS_H
|