anderslanglands added a comment.

I ended up modifying c-index-test to print out the template arguments in the 
same way it does for FunctionDecl, which ends up working all cases in the 
existing test suite. The only other thing I added was a specific case in 
index-templates.cpp to check whether it catches StructDecl too (it does).



================
Comment at: clang/tools/libclang/CXCursor.cpp:1357
+  CXCursorKind kind = clang_getCursorKind(C);
+  if (kind != CXCursor_FunctionDecl && kind != CXCursor_StructDecl &&
+      kind != CXCursor_ClassDecl &&
----------------
aaron.ballman wrote:
> `CXCursor_StructDecl` is interesting -- does that only get used in C or will 
> it also show up in C++? If it's C-only, we can drop that bit.
It does. I added a case to index-templates.cpp that tests for this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134416

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to