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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 14 13:43:13 PST 2015


On Mon, Dec 14, 2015 at 4:39 PM, Yaron Keren <yaron.keren at gmail.com> wrote:
> MSVC 2013 Update 5 accepts for (bool SkipUnwritten : {false, true}).
> Possibly changed in one of the Updates?

I tested using MSVC 2013 Update 5.

Microsoft Visual Studio Ultimate 2013
Version 12.0.40629.00 Update 5
Microsoft .NET Framework
Version 4.6.01055

~Aaron

>
> 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
>
>


More information about the cfe-commits mailing list