[PATCH] D80940: [clang-format] [PR46159] Linux kernel 'C' code uses 'try' as a variable name, allow clang-format to handle such cases

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 3 10:58:22 PDT 2020


MyDeveloperDay added a comment.

In D80940#2071247 <https://reviews.llvm.org/D80940#2071247>, @curdeius wrote:

> LGTM.
>
> For a second, I thought that you could simplify the code by removing this @try condition (and calling the function `FormatTokenLexer::tryTransformTryUsageForC()` only if `isCppOnly`, but given that Objective is a superset of C, it's probably safer to keep it the way it's done now.


this is the premise of D80079: [clang-format] [NFC]  isCpp() is inconsistently used to mean both C++ and Objective C, add language specific isXXX() functions <https://reviews.llvm.org/D80079> but as we now are learning isCpp() is what is says on the tin!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80940/new/

https://reviews.llvm.org/D80940





More information about the cfe-commits mailing list