Index: include/clang/AST/AttrVisitor.h =================================================================== --- /dev/null +++ include/clang/AST/AttrVisitor.h @@ -0,0 +1,79 @@ +//===- AttrVisitor.h - Visitor for Attr subclasses --------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the AttrVisitor interface. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_AST_ATTRVISITOR_H +#define LLVM_CLANG_AST_ATTRVISITOR_H + +#include "clang/AST/Attr.h" + +namespace clang { + +namespace attrvisitor { + +template struct make_ptr { using type = T *; }; +template struct make_const_ptr { using type = const T *; }; + +/// A simple visitor class that helps create attribute visitors. +template