[PATCH] D20150: clang-rename: fix renaming of field with implicit initializers
    Miklos Vajna via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed May 11 01:18:05 PDT 2016
    
    
  
vmiklos added inline comments.
================
Comment at: clang-rename/USRLocFinder.cpp:64
@@ +63,3 @@
+      if (Initializer->getSourceOrder() == -1) {
+        // Ignore implicit initializers.
+        continue;
----------------
klimek wrote:
> Add a comment like:
> // The source location of implicit initializers is the constructor declaration.
> 
> Also: should we add a check that the token of the source location we find actually has the old name?
I don't know off the top of my head a situation where this is needed, but sure, sounds like a useful safety check. I'll have a look.
Repository:
  rL LLVM
http://reviews.llvm.org/D20150
    
    
More information about the cfe-commits
mailing list