owenca wrote:

> > If we add a `bool GuessObjC` parameter to `guessLanguage()`, would that 
> > solve the problem?
> 
> I assume you mean making it so that when clangd calls into `guessLanguage()`, 
> the ObjC guessing algorithm is skipped entirely.

I'm not familiar with clangd use cases, but I thought the `GuessObjC` flag 
would allow clangd to skip the guessing ObjC part for those "users who merely 
use these libraries (and so may open them in the editor to look at the header, 
but will not try to format it)". If it wouldn't work as you pointed out, then 
we probably need a new ObjC guesser that only relies on the lexer, similar to 
what's done in 
[IntegerLiteralSeparatorFixer::process()](https://github.com/llvm/llvm-project/blob/afd469023aad10786eaea3d444047a558ad8d5c1/clang/lib/Format/IntegerLiteralSeparatorFixer.cpp#L45).

https://github.com/llvm/llvm-project/pull/78925
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to