aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2022-09-29 11:38:52 -0700
committerErich Keane <erich.keane@intel.com>2022-10-04 10:32:48 -0700
commit3d7946c580055dade1dcf4b632738cc54e1a25a9 (patch)
tree4e1fd4f9966566cf7f17fe29ff9a7ffe5e585052 /clang/lib/Frontend/FrontendActions.cpp
parent7d85f6b1af26c8f749f0c217d7aae694cc3931eb (diff)
downloadllvm-3d7946c580055dade1dcf4b632738cc54e1a25a9.zip
llvm-3d7946c580055dade1dcf4b632738cc54e1a25a9.tar.gz
llvm-3d7946c580055dade1dcf4b632738cc54e1a25a9.tar.bz2
Implement DR2565: Invalid types in the parameter-declaration-clause of a
requires-expression As reported: https://github.com/llvm/llvm-project/issues/57487 We properly treated a failed instantiation of a concept as a unsatisified constraint, however, we need to do this at the 'requires clause' level as well. This ensures that the parameters on a requires clause that fail instantiation will cause a satisfaction failure. This patch implements this by running requires parameter clause instantiation under a SFINAE trap, then stores any such failure as a requirement failure, so it can be diagnosed later.
Diffstat (limited to 'clang/lib/Frontend/FrontendActions.cpp')
-rw-r--r--clang/lib/Frontend/FrontendActions.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp
index cff61d7..be3c42e 100644
--- a/clang/lib/Frontend/FrontendActions.cpp
+++ b/clang/lib/Frontend/FrontendActions.cpp
@@ -470,6 +470,8 @@ private:
return "ConstraintSubstitution";
case CodeSynthesisContext::ConstraintNormalization:
return "ConstraintNormalization";
+ case CodeSynthesisContext::RequirementParameterInstantiation:
+ return "RequirementParameterInstantiation";
case CodeSynthesisContext::ParameterMappingSubstitution:
return "ParameterMappingSubstitution";
case CodeSynthesisContext::RequirementInstantiation: