================
@@ -59,6 +59,21 @@ static bool canBeObjCSelectorComponent(const FormatToken
&Tok) {
return Tok.Tok.getIdentifierInfo();
}
+/// Returns \c true if the token likely names an object-like macro.
+static bool isPossibleMacro(const FormatToken &Tok) {
----------------
Lane0218 wrote:
Thanks, updated.
I merged the heuristic into `FormatToken::isPossibleMacro(...)` and reused it
in both places. For the `TokenAnnotator` use case, I added
`AllowFollowingColonColon` so macro-like cases such as `ALWAYS_INLINE
::std::string` stay conservative while `T :: member` still formats as
`T::member`.
https://github.com/llvm/llvm-project/pull/189024
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits