[PATCH] D77791: [ASTMatchers] Add support for dynamic matching of ofKind narrowing matcher
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 9 06:28:42 PDT 2020
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM, thank you!
================
Comment at: clang/lib/ASTMatchers/Dynamic/Marshallers.cpp:102-106
+ static constexpr llvm::StringRef Allowed[] = {
+ "UETT_SizeOf", "UETT_AlignOf",
+ "UETT_VecStep", "UETT_OpenMPRequiredSimdAlign",
+ "UETT_PreferredAlignOf",
+ };
----------------
njames93 wrote:
> aaron.ballman wrote:
> > Did clang-format produce this formatting?
> when I ran git-clang-format I dont think it did, but when i went to upload the patch i got this in the pre-upload linting
> ```
> --- /home/nathan/src/llvm-project/clang/lib/ASTMatchers/Dynamic/Marshallers.cpp 2020-04-09 12:12:28.810339833 +0100
> +++ /tmp/6p7zxlltj4g8wgcc/9888-onMes8 2020-04-09 12:44:11.187257096 +0100
> @@ -99,11 +99,11 @@
> llvm::Optional<std::string>
> clang::ast_matchers::dynamic::internal::ArgTypeTraits<
> clang::UnaryExprOrTypeTrait>::getBestGuess(const VariantValue &Value) {
> - static constexpr llvm::StringRef Allowed[] = {"UETT_SizeOf",
> - "UETT_AlignOf",
> - "UETT_VecStep",
> - "UETT_OpenMPRequiredSimdAlign",
> - "UETT_PreferredAlignOf",};
> + static constexpr llvm::StringRef Allowed[] = {
> + "UETT_SizeOf", "UETT_AlignOf",
> + "UETT_VecStep", "UETT_OpenMPRequiredSimdAlign",
> + "UETT_PreferredAlignOf",
> + };
> ```
I think the pre-upload linting is wrong (I can't find many instances of lists that look like that in LLVM anyway, but I know of plenty of instances of the other style). Not a huge deal though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77791/new/
https://reviews.llvm.org/D77791
More information about the cfe-commits
mailing list