[clang] [Clang][Comments] Support for parsing headers in Doxygen \par commands (PR #91100)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon May 6 07:31:34 PDT 2024
================
@@ -149,6 +149,63 @@ class TextTokenRetokenizer {
addToken();
}
+ /// Check if this line starts with @par or \par
+ bool startsWithParCommand() {
+ unsigned Offset = 1;
+
+ /// Skip all whitespace characters at the beginning.
+ /// This needs to backtrack because Pos has already advanced past the
+ /// actual \par or @par command by the time this function is called.
+ while (isWhitespace(*(Pos.BufferPtr - Offset)))
+ Offset++;
----------------
AaronBallman wrote:
You can use `StringRef::ltrim()` to handle this instead of doing it manually.
https://github.com/llvm/llvm-project/pull/91100
More information about the cfe-commits
mailing list