[PATCH] D136975: [Concepts] Correctly handle failure when checking concepts recursively

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 1 06:52:04 PDT 2022


erichkeane marked 2 inline comments as done.
erichkeane added inline comments.


================
Comment at: clang/lib/Sema/SemaConcept.cpp:150
+namespace {
+struct SatisfactionStackRAII {
+  Sema &SemaRef;
----------------
aaron.ballman wrote:
> Er, it'd be nice for this not to shadow the name of the class from `Sema`, that's pretty confusing.
What do you mean?  What name does it shadow?


================
Comment at: clang/lib/Sema/SemaConcept.cpp:276-278
+  for (const auto &List : MLTAL)
+    for (const auto &TemplateArg : List.Args)
+      TemplateArg.Profile(ID, S.Context);
----------------
aaron.ballman wrote:
> What are the chances that this `O(N^2)` operation is going to come back to bite us in terms of compile time performance?
I'd hope not too much?  This is just going through the whole list of template arguments on this expression, so I think that makes this `O(M*N)`, where M and N are limited by the number of template arguments we allow.



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

https://reviews.llvm.org/D136975



More information about the cfe-commits mailing list