[PATCH] D84136: [clangd] Fix visitation of ConceptSpecializationExpr in constrained-parameter

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 20 04:44:29 PDT 2020


kadircet added a comment.

just some drive-by comments.



================
Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:433
+  )cpp";
+  Flags.push_back("-std=c++20");
+  EXPECT_DECLS("ConceptSpecializationExpr",
----------------
`Flags` is preserved between `EXPECT_DECLS` calls, so either use assignment or set it only once at the beginning of the test.


================
Comment at: clang/include/clang/AST/ExprConcepts.h:132
+    // there may not be a template argument list.
+    return ArgsAsWritten->RAngleLoc.isValid() ? ArgsAsWritten->RAngleLoc
+                                              : ConceptName.getEndLoc();
----------------
i think we should have some tests in clang, at least an ast-dump test in `clang/test/AST/` (for both cases) and possibly also in `clang/unittests/AST/SourceLocationTest.cpp`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84136





More information about the cfe-commits mailing list