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

Samuel Benzaquen via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 15 11:44:36 PST 2015


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 wrote:
> StringRef not needed, simply
> 
>   llvm::SmallString<128> NodeName = "::";
> 
I tried it before. It doesn't work.

/usr/local/google/llvm_git/llvm/tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp:321:28: error: no viable conversion from 'const char [3]' to
      'llvm::SmallString<128>'
    llvm::SmallString<128> NodeName = "::";



http://reviews.llvm.org/D15506





More information about the cfe-commits mailing list