[PATCH] ASTMatcher for Attr
Manuel Klimek
klimek at google.com
Thu Aug 21 10:16:07 PDT 2014
================
Comment at: lib/ASTMatchers/Dynamic/Marshallers.h:79-88
@@ -78,1 +78,12 @@
+template <>
+struct ArgTypeTraits<attr::Kind> {
+ static bool is(const VariantValue &Value) { return Value.isUnsigned(); }
+ static attr::Kind get(const VariantValue &Value) {
+ return static_cast<attr::Kind>(Value.getUnsigned());
+ }
+ static ArgKind getKind() {
+ return ArgKind(ArgKind::AK_Unsigned);
+ }
+};
+
----------------
And that's enough to make the dynamic matchers work? Can you add an example to the dynamic matchers test? Thx!
http://reviews.llvm.org/D4996
More information about the cfe-commits
mailing list