[PATCH] D15506: [ASTMatchers] Allow hasName() to look through inline namespaces

Yaron Keren via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 14 13:39:50 PST 2015


MSVC 2013 Update 5 accepts for (bool SkipUnwritten : {false, true}).
Possibly changed in one of the Updates?

2015-12-14 23:35 GMT+02:00 Aaron Ballman via cfe-commits <
cfe-commits at lists.llvm.org>:

> aaron.ballman added a subscriber: aaron.ballman.
>
> ================
> Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:320
> @@ -323,3 +319,3 @@
>
> -  if (Pattern.startswith("::"))
> -    return FullName == Pattern;
> +  for (bool SkipUnwritten : {false, true}) {
> +    llvm::SmallString<128> NodeName = StringRef("::");
> ----------------
> Cute, but this won't work with MSVC 2013. You'll get: error C3312: no
> callable 'begin' function found for type 'initializer-list'
>
> ================
> Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:334
> @@ +333,3 @@
> +
> +    if (Pattern.startswith("::")) {
> +      if (FullName == Pattern) return true;
> ----------------
> Should elide braces and format using clang-format.
>
>
> http://reviews.llvm.org/D15506
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151214/fb66aa6f/attachment.html>


More information about the cfe-commits mailing list