owenca wrote:
> I would do this instead:
>
> ```diff
> --- a/clang/lib/Format/TokenAnnotator.cpp
> +++ b/clang/lib/Format/TokenAnnotator.cpp
> @@ -2336,7 +2336,7 @@ private:
> for (FormatToken *Previous = Current.Previous;
> Previous && Previous->isOneOf(tok::star, tok::amp);
> Previous = Previous->Previous) {
> - Previous->setType(TT_PointerOrReference);
> + Previous->setFinalizedType(TT_PointerOrReference);
> }
> if (Line.MustBeDeclaration &&
> Contexts.front().ContextType != Context::CtorInitializer) {
> ```
>
> IMO, this is more conservative and serves a catch-all for uncovered edge
> cases.
Also, it would obsolete #212856, which caused the regression in #222132.
https://github.com/llvm/llvm-project/pull/220080
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits