[all-commits] [llvm/llvm-project] 15f049: [NFC] Fix a mem-sanitizer found issue in AutoType
Erich Keane via All-commits
all-commits at lists.llvm.org
Fri Apr 28 10:09:40 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 15f0491d3963d91202aef659acc20f59aa83fae7
https://github.com/llvm/llvm-project/commit/15f0491d3963d91202aef659acc20f59aa83fae7
Author: Erich Keane <erich.keane at intel.com>
Date: 2023-04-28 (Fri, 28 Apr 2023)
Changed paths:
M clang/lib/AST/ASTContext.cpp
M clang/lib/AST/Type.cpp
Log Message:
-----------
[NFC] Fix a mem-sanitizer found issue in AutoType
We only need the list of constriant template arguments when we have a
valid constraint. We give up on merging the auto-type constraints if
the template arguments don't match, but neglected to clear the
collection of template arguments. The result was we had an AutoType
where we initialized the number of template arguments, but never
initialized the template arguments themselves.
This patch adds an assert to catch this in the future, plus ensures we
clear out the vector so we don't try to create the AutoType incorrectly.
More information about the All-commits
mailing list