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

2016-02-05 Thread Samuel Benzaquen via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL259898: [ASTMatchers] Allow hasName() to look through inline namespaces (authored by sbenza). Changed prior to commit: http://reviews.llvm.org/D15506?vs=45438&id=47029#toc Repository: rL LLVM http:/

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

2016-02-05 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D15506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

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

2016-02-04 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Prazek added a comment. What is the status of it? http://reviews.llvm.org/D15506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-01-20 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:351 @@ +350,3 @@ + + // First, match the name. + if (!MatchNodeName(Pattern, Node)) klimek wrote: > Perhaps comment that Pattern will be changed to the prefix, so it's clear > aft

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

2016-01-20 Thread Samuel Benzaquen via cfe-commits
sbenza updated this revision to Diff 45438. sbenza added a comment. Rename functions. http://reviews.llvm.org/D15506 Files: include/clang/ASTMatchers/ASTMatchersInternal.h lib/ASTMatchers/ASTMatchersInternal.cpp unittests/ASTMatchers/ASTMatchersTest.cpp Index: unittests/ASTMatchers/ASTMa

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

2016-01-15 Thread Manuel Klimek via cfe-commits
klimek added a reviewer: bkramer. klimek added a comment. Adding Benjamin for an additional pair of eyes. Generally looks good. Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:351 @@ +350,3 @@ + + // First, match the name. + if (!MatchNodeName(Pattern, Node)) -

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

2016-01-15 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh added a comment. Manuel, can you take a look at this? http://reviews.llvm.org/D15506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-01-07 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. It'll be great to finalize fix before 3.8 branching (planned at January 13). http://reviews.llvm.org/D15506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

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

2015-12-15 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:322 @@ +321,3 @@ + for (bool SkipUnwritten : SkipUnwrittenCases) { +llvm::SmallString<128> NodeName = StringRef("::"); +llvm::raw_svector_ostream OS(NodeName); yaron.keren w

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

2015-12-15 Thread Samuel Benzaquen via cfe-commits
sbenza updated this revision to Diff 42884. sbenza added a comment. Add a faster version of the qualified name matcher. It falls back to the previous version if it can't handle the name. http://reviews.llvm.org/D15506 Files: include/clang/ASTMatchers/ASTMatchersInternal.h lib/ASTMatchers/AS

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

2015-12-14 Thread Yaron Keren via cfe-commits
yaron.keren added inline comments. Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:322 @@ +321,3 @@ + for (bool SkipUnwritten : SkipUnwrittenCases) { +llvm::SmallString<128> NodeName = StringRef("::"); +llvm::raw_svector_ostream OS(NodeName); StringRe

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

2015-12-14 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:320-331 @@ -323,4 +319,14 @@ - if (Pattern.startswith("::")) -return FullName == Pattern; + const bool SkipUnwrittenCases[] = {false, true}; + for (bool SkipUnwritten : SkipUnwrittenC

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

2015-12-14 Thread Samuel Benzaquen via cfe-commits
sbenza added a comment. I am thinking on doing this some other way. Copying the PrintingPolicy object is very expensive, as it contains quite a few strings and vectors of strings. In the past I changed this matcher to make no allocations in the common path (ie using SmallString<>, etc) to reduce

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

2015-12-14 Thread Yaron Keren via cfe-commits
That's odd. I'm using the same update 5 exactly, added " for (bool SkipUnwritten : {false, true});" inside a LLVM source file and re-compiled. MSVC complained about the unused SkipUnwritten but was therwise OK with the code. 2015-12-14 23:43 GMT+02:00 Aaron Ballman : > On Mon, Dec 14, 2015 at 4

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

2015-12-14 Thread Samuel Benzaquen via cfe-commits
sbenza updated this revision to Diff 42767. sbenza added a comment. Minor fixes http://reviews.llvm.org/D15506 Files: lib/ASTMatchers/ASTMatchersInternal.cpp unittests/ASTMatchers/ASTMatchersTest.cpp Index: unittests/ASTMatchers/ASTMatchersTest.cpp =

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

2015-12-14 Thread Aaron Ballman via cfe-commits
On Mon, Dec 14, 2015 at 4:39 PM, Yaron Keren 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 Ve

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

2015-12-14 Thread Yaron Keren via cfe-commits
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@lists.llvm.org>: > aaron.ballman added a subscriber: aaron.ballman. > > > Comment at: lib/ASTMatcher

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

2015-12-14 Thread Aaron Ballman via cfe-commits
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 = Str

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

2015-12-14 Thread Samuel Benzaquen via cfe-commits
sbenza created this revision. sbenza added a reviewer: klimek. sbenza added a subscriber: cfe-commits. Herald added a subscriber: klimek. Allow hasName() to look through inline namespaces. This will fix the interaction between some clang-tidy checks and libc++. libc++ defines names in an inline n