AaronBallman wrote:
> > Ok, well if I change `fastParseASCIIIdentifierSSE42` to
> > `fastParseASCIIIdentifier` I still get
> > ```
> > ../../clang/lib/Lex/Lexer.cpp:1937:1: error: unused function
> > 'fastParseASCIIIdentifier' [-Werror,-Wunused-function]
> > 1937 | fastParseASCIIIdentifier(const char *CurPtr, const char *BufferEnd)
> > {
> > | ^~~~~~~~~~~~~~~~~~~~~~~~
> > 1 error generated.
> > ```
>
> To me, this seems more of a Clang bug that a real issue in the code.
> Explicitly marking the function as used seems like the only fix, though it is
> more of a hack. Is this acceptable?
I think it's almost a requirement; even if we change the behavior of Clang, we
still need to be able to compile with older Clang versions because the fixed
version won't be widely available for a while.
As for the behavior, my intuition is that it's a bug because the unused variant
of the function is intentionally unused due to the target attribute. That would
be worth filing an issue about.
https://github.com/llvm/llvm-project/pull/175452
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits