aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h')
-rw-r--r--contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h b/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h
index 2a88ed5175d2..1544c498ef66 100644
--- a/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h
+++ b/contrib/llvm-project/clang/include/clang/AST/ExprConcepts.h
@@ -126,7 +126,11 @@ public:
}
SourceLocation getEndLoc() const LLVM_READONLY {
- return ArgsAsWritten->RAngleLoc;
+ // If the ConceptSpecializationExpr is the ImmediatelyDeclaredConstraint
+ // of a TypeConstraint written syntactically as a constrained-parameter,
+ // there may not be a template argument list.
+ return ArgsAsWritten->RAngleLoc.isValid() ? ArgsAsWritten->RAngleLoc
+ : ConceptName.getEndLoc();
}
// Iterators