diff options
author | Nikita Popov <npopov@redhat.com> | 2025-03-10 10:18:56 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2025-03-10 10:32:08 +0100 |
commit | 07f3388fff0c73c1119d06ca1c2353fd012361c0 (patch) | |
tree | f750a1d6664b370228a0c783ad770a06ded8abcd /clang/lib/Sema/SemaInit.cpp | |
parent | c579ec66c77461122d93deadebc318fbb846b830 (diff) | |
download | llvm-07f3388fff0c73c1119d06ca1c2353fd012361c0.zip llvm-07f3388fff0c73c1119d06ca1c2353fd012361c0.tar.gz llvm-07f3388fff0c73c1119d06ca1c2353fd012361c0.tar.bz2 |
Revert "[clang] Implement instantiation context note for checking template parameters (#126088)"
This reverts commit a24523ac8dc07f3478311a5969184b922b520395.
This is causing significant compile-time regressions for C++ code, see:
https://github.com/llvm/llvm-project/pull/126088#issuecomment-2704874202
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index edbd4c0..56ec33f 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -7271,7 +7271,7 @@ static void CheckCXX98CompatAccessibleCopy(Sema &S, void InitializationSequence::PrintInitLocationNote(Sema &S, const InitializedEntity &Entity) { - if (Entity.isParameterKind() && Entity.getDecl()) { + if (Entity.isParamOrTemplateParamKind() && Entity.getDecl()) { if (Entity.getDecl()->getLocation().isInvalid()) return; @@ -7280,8 +7280,9 @@ void InitializationSequence::PrintInitLocationNote(Sema &S, << Entity.getDecl()->getDeclName(); else S.Diag(Entity.getDecl()->getLocation(), diag::note_parameter_here); - } else if (Entity.getKind() == InitializedEntity::EK_RelatedResult && - Entity.getMethodDecl()) + } + else if (Entity.getKind() == InitializedEntity::EK_RelatedResult && + Entity.getMethodDecl()) S.Diag(Entity.getMethodDecl()->getLocation(), diag::note_method_return_type_change) << Entity.getMethodDecl()->getDeclName(); |