[clang] [clang-format] Handles Elaborated type specifier for enum in trailing return (PR #80085)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 30 18:04:39 PST 2024
================
@@ -1760,8 +1760,8 @@ void UnwrappedLineParser::parseStructuralElement(
break;
}
case tok::kw_enum:
- // Ignore if this is part of "template <enum ...".
- if (Previous && Previous->is(tok::less)) {
+ // Ignore if this is part of "template <enum ..." or "... -> enum".
+ if (Previous && (Previous->is(tok::less) || Previous->is(tok::arrow))) {
----------------
owenca wrote:
You can use `isOneOf`.
https://github.com/llvm/llvm-project/pull/80085
More information about the cfe-commits
mailing list