[PATCH] D61538: [clang][ASTContext] Call setAttached for comments attached to a declaration

Jan Korous via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 10:52:46 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL360607: [clang][ASTContext] Call setAttached for comments attached to a declaration (authored by jkorous, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D61538?vs=198089&id=199298#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61538/new/

https://reviews.llvm.org/D61538

Files:
  cfe/trunk/lib/AST/ASTContext.cpp


Index: cfe/trunk/lib/AST/ASTContext.cpp
===================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp
+++ cfe/trunk/lib/AST/ASTContext.cpp
@@ -255,6 +255,7 @@
         SourceMgr.getLineNumber(DeclLocDecomp.first, DeclLocDecomp.second)
           == SourceMgr.getLineNumber(CommentBeginDecomp.first,
                                      CommentBeginDecomp.second)) {
+      (**Comment).setAttached();
       return *Comment;
     }
   }
@@ -296,6 +297,7 @@
   if (Text.find_first_of(";{}#@") != StringRef::npos)
     return nullptr;
 
+  (**Comment).setAttached();
   return *Comment;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61538.199298.patch
Type: text/x-patch
Size: 633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190513/eb15510a/attachment.bin>


More information about the llvm-commits mailing list