[PATCH] D77503: [ASTMatchers] Fixed CastKind being parsed incorrectly for dynamic matchers
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 5 10:08:31 PDT 2020
njames93 created this revision.
njames93 added a reviewer: klimek.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Requires hasCastKind arguments to have `CK_` prefixed to bring it in line with the documentation and other matchers that take enumerations.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D77503
Files:
clang/lib/ASTMatchers/Dynamic/Marshallers.h
Index: clang/lib/ASTMatchers/Dynamic/Marshallers.h
===================================================================
--- clang/lib/ASTMatchers/Dynamic/Marshallers.h
+++ clang/lib/ASTMatchers/Dynamic/Marshallers.h
@@ -147,7 +147,7 @@
private:
static Optional<CastKind> getCastKind(llvm::StringRef AttrKind) {
return llvm::StringSwitch<Optional<CastKind>>(AttrKind)
-#define CAST_OPERATION(Name) .Case( #Name, CK_##Name)
+#define CAST_OPERATION(Name) .Case("CK_" #Name, CK_##Name)
#include "clang/AST/OperationKinds.def"
.Default(llvm::None);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77503.255172.patch
Type: text/x-patch
Size: 567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200405/6a1b5328/attachment.bin>
More information about the cfe-commits
mailing list