aboutsummaryrefslogtreecommitdiff
path: root/clang/examples
diff options
context:
space:
mode:
Diffstat (limited to 'clang/examples')
-rw-r--r--clang/examples/Attribute/Attribute.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/examples/Attribute/Attribute.cpp b/clang/examples/Attribute/Attribute.cpp
index 159b09e..24b95dd 100644
--- a/clang/examples/Attribute/Attribute.cpp
+++ b/clang/examples/Attribute/Attribute.cpp
@@ -9,6 +9,8 @@
// 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"
@@ -27,9 +29,10 @@ struct ExampleAttrInfo : public ParsedAttrInfo {
// number of arguments. This just illustrates how many arguments a
// `ParsedAttrInfo` can hold, we will not use that much in this example.
OptArgs = 15;
- // GNU-style __attribute__(("example")) and C++-style [[example]] and
+ // GNU-style __attribute__(("example")) and C++/C2x-style [[example]] and
// [[plugin::example]] supported.
static constexpr Spelling S[] = {{ParsedAttr::AS_GNU, "example"},
+ {ParsedAttr::AS_C2x, "example"},
{ParsedAttr::AS_CXX11, "example"},
{ParsedAttr::AS_CXX11, "plugin::example"}};
Spellings = S;