[PATCH] D141950: Use find_last_of when seraching for code in getRawCommentForDeclNoCacheImpl
Kugan Vivekanandarajah via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 4 22:44:50 PST 2023
kuganv updated this revision to Diff 494870.
kuganv added a comment.
Rebasing branch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141950/new/
https://reviews.llvm.org/D141950
Files:
clang/lib/AST/ASTContext.cpp
Index: clang/lib/AST/ASTContext.cpp
===================================================================
--- clang/lib/AST/ASTContext.cpp
+++ clang/lib/AST/ASTContext.cpp
@@ -348,7 +348,7 @@
// There should be no other declarations or preprocessor directives between
// comment and declaration.
- if (Text.find_first_of(";{}#@") != StringRef::npos)
+ if (Text.find_last_of(";{}#@") != StringRef::npos)
return nullptr;
return CommentBeforeDecl;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141950.494870.patch
Type: text/x-patch
Size: 463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230205/1d267dd0/attachment.bin>
More information about the cfe-commits
mailing list