[clang-tools-extra] allow implicit completion inside empty template argument list (PR #138846)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Wed May 7 05:03:59 PDT 2025


================
@@ -2455,6 +2455,11 @@ bool isIncludeFile(llvm::StringRef Line) {
 }
 
 bool allowImplicitCompletion(llvm::StringRef Content, unsigned Offset) {
+  // Check if we're inside an empty template argument list
+  if (Content.size() > 2 && Content[Offset - 1] == '<' &&
+      Content[Offset] == '>')
+    return true;
+
----------------
zyn0217 wrote:

Does it also pop up a completion within a template parameter list?
```cpp
template <^> class foo {};
```

https://github.com/llvm/llvm-project/pull/138846


More information about the cfe-commits mailing list