diff options
author | Vitaly Buka <vitalybuka@google.com> | 2023-05-12 15:35:28 -0700 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2023-05-18 01:21:29 -0700 |
commit | 11fe9310b9146ee7dfd7cf01662e8fc0a7cd508c (patch) | |
tree | bcedcc113a13a690f1aacf5bbc02059484ac4500 | |
parent | b96d0635f0c65de2fbbcf67fac7e70f9cce35171 (diff) | |
download | llvm-11fe9310b9146ee7dfd7cf01662e8fc0a7cd508c.zip llvm-11fe9310b9146ee7dfd7cf01662e8fc0a7cd508c.tar.gz llvm-11fe9310b9146ee7dfd7cf01662e8fc0a7cd508c.tar.bz2 |
[AST] Initialized AutoTypeLocInfo::FoundDecl
Msan complains if getFoundDecl called before it's set.
This looks like data class, so I see no reason to keep
the single field uninitialized.
-rw-r--r-- | clang/include/clang/AST/TypeLoc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/include/clang/AST/TypeLoc.h b/clang/include/clang/AST/TypeLoc.h index 72ed3cb..8bf64dc 100644 --- a/clang/include/clang/AST/TypeLoc.h +++ b/clang/include/clang/AST/TypeLoc.h @@ -2102,7 +2102,7 @@ struct AutoTypeLocInfo : TypeSpecLocInfo { NestedNameSpecifierLoc NestedNameSpec; SourceLocation TemplateKWLoc; SourceLocation ConceptNameLoc; - NamedDecl *FoundDecl; + NamedDecl *FoundDecl = nullptr; SourceLocation LAngleLoc; SourceLocation RAngleLoc; |