[PATCH] D155460: [clang][clangd][c++20] Improve support of type constraints in TemplateTypeParms.

Jens Massberg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 17 06:54:25 PDT 2023


massberg added inline comments.


================
Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:562
   )cpp";
-  EXPECT_DECLS("ConceptSpecializationExpr",
+  EXPECT_DECLS("TemplateTypeParmTypeLoc",
                {"template <typename T> concept Fooable = true"});
----------------
This is now a `TemplateTypeParmTypeLoc` as we have extended `TemplateTypeParmTypeLoc:getLocalSourceRange()` to include the constraint. Might this be problematic?


================
Comment at: clang/unittests/AST/SourceLocationTest.cpp:274
+
+  Verifier.expectRange(2, 11, 2, 31);
+  EXPECT_TRUE(Verifier.match("template <typename T> concept Fooable = true;\n"
----------------
This range looks a bit to long. What I'm doing wrong?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155460



More information about the cfe-commits mailing list