<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/149960>149960</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] unwanted space added between an identifier named 'import' and a open angle bracket
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          RoyAwesome
      </td>
    </tr>
</table>

<pre>
    Using clang-format version 20.1.8

I have a template function named `import` and clang-format keeps inserting an unwanted space between the identifier and the template params.  

```cpp
 _world->component<engine_info_t>(); // normal template params are formatted correctly 
_world->import <engine_module>(); // Unwanted space after import but before <
```

I haven't found any other case where this extra space is inserted.  I suspect it's because `import` is a contextual keyword related to cpp20 modules and clang-format is not understanding this isn't a module import.


I can't attach my .clang-format so here it is:

```
Language: Cpp
BasedOnStyle: Microsoft
DerivePointerAlignment: false
PointerAlignment: Left
ReferenceAlignment: Left
IndentWidth: 4
BreakTemplateDeclarations: Yes
BreakBeforeConceptDeclarations: Always
SpaceAfterTemplateKeyword: false
RequiresExpressionIndentation: OuterScope
IndentRequiresClause: true
NamespaceIndentation: All
FixNamespaceComments: false
SpaceBeforeParens: Never
SpacesInAngles: Never
AllowShortFunctionsOnASingleLine: Inline
PackConstructorInitializers: Never
BreakConstructorInitializers: BeforeComma
AllowShortCaseLabelsOnASingleLine: true
IndentCaseLabels: true
InsertBraces: true
IndentAccessModifiers: false
SpaceBeforeCpp11BracedList: true
AlignArrayOfStructures: Left
AllowShortLambdasOnASingleLine: All
BreakBeforeBraces: Custom
BraceWrapping:
  BeforeLambdaBody: false
  AfterFunction: true
SortIncludes: CaseInsensitive
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8Vd1u2zgTfRr6ZhBDlv-qC18oTg0YX9oU9VcUe1WMyZHMDUVqyZEd79MvSMmJnXQXCBBD83fOzO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