[clang] b9b37ea - [clang] Fix sanitizer bot failure after 14ca8d4 (#73928)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 30 04:34:18 PST 2023
Author: Mariya Podchishchaeva
Date: 2023-11-30T13:34:11+01:00
New Revision: b9b37ea9493b5c1cadaf9cc8547a4525a6ab3854
URL: https://github.com/llvm/llvm-project/commit/b9b37ea9493b5c1cadaf9cc8547a4525a6ab3854
DIFF: https://github.com/llvm/llvm-project/commit/b9b37ea9493b5c1cadaf9cc8547a4525a6ab3854.diff
LOG: [clang] Fix sanitizer bot failure after 14ca8d4 (#73928)
Initialize field so there is no use-of-uninitialized-value warning.
Added:
Modified:
clang/lib/Sema/SemaDecl.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 67d0997b32e157a..c0d21ec330acfd8 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -489,6 +489,7 @@ ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc,
SS->getScopeRep(), &II);
TypeLocBuilder TLB;
DependentNameTypeLoc TL = TLB.push<DependentNameTypeLoc>(T);
+ TL.setElaboratedKeywordLoc(SourceLocation());
TL.setQualifierLoc(SS->getWithLocInContext(Context));
TL.setNameLoc(NameLoc);
return CreateParsedType(T, TLB.getTypeSourceInfo(Context, T));
More information about the cfe-commits
mailing list