================
@@ -99,6 +100,66 @@ bool rangeContainsExpansionsOrDirectives(SourceRange Range,
   return false;
 }
 
+std::vector<CommentToken>
+getTrailingCommentsInRange(CharSourceRange Range, const SourceManager &SM,
+                           const LangOptions &LangOpts) {
+  std::vector<CommentToken> Comments;
+  if (!Range.isValid())
+    return Comments;
+
+  const CharSourceRange FileRange =
+      Lexer::makeFileCharRange(Range, SM, LangOpts);
+  if (!FileRange.isValid())
----------------
vbvictor wrote:

```suggestion
  if (FileRange.isInValid())
```

https://github.com/llvm/llvm-project/pull/180371
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to