//===- Attribute.cpp ------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // Example clang plugin which adds an an annotation to file-scope declarations // with the 'example' attribute. // // This plugin is used by clang/test/Frontend/plugin-attribute tests. // //===----------------------------------------------------------------------===// #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" #include "clang/Sema/ParsedAttr.h" #include "clang/Sema/Sema.h" #include "clang/Sema/SemaDiagnostic.h" #include "llvm/IR/Attributes.h" usingnamespaceclang; namespace { struct ExampleAttrInfo : public ParsedAttrInfo { … }; } // namespace static ParsedAttrInfoRegistry::Add<ExampleAttrInfo> X("example", "");