nridge added a comment.

Thanks for the patch!

Could you add a semantic highlighting test case to 
SemanticHighlighting.GetsCorrectTokens 
<https://searchfox.org/llvm/rev/c7bee26f4fe170a065e48a2650e70802e9fc9ece/clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp#97>
 as well please? The test cases there are pieces of code annotated with the 
type of highlighting kind each token should get.



================
Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:2037
                                                                                
\
     TRY_TO(TraverseNestedNameSpecifierLoc(D->getQualifierLoc()));              
\
+    if (getDerived().shouldVisitTemplateInstantiations() ||                    
\
----------------
We should move this call to `TraverseNestedNameSpecifierLoc` into the `else` 
branch, since `Traverse...Helper` already does that:

* `TraverseCXXRecordHelper` does it via `TraverseRecordHelper` 
[here](https://searchfox.org/llvm/rev/c7bee26f4fe170a065e48a2650e70802e9fc9ece/clang/include/clang/AST/RecursiveASTVisitor.h#1995)
* `TraverseVarHelper` does it via `TraverseDeclaratorHelper` 
[here](https://searchfox.org/llvm/rev/c7bee26f4fe170a065e48a2650e70802e9fc9ece/clang/include/clang/AST/RecursiveASTVisitor.h#2098)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126757

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

Reply via email to