[clang] [clang] Fix sanitizer bot failure after 14ca8d4 (PR #73928)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 30 04:13:26 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Mariya Podchishchaeva (Fznamznon)
<details>
<summary>Changes</summary>
Initialize field so there is no use-of-uninitialized-value warning.
---
Full diff: https://github.com/llvm/llvm-project/pull/73928.diff
1 Files Affected:
- (modified) clang/lib/Sema/SemaDecl.cpp (+1)
``````````diff
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));
``````````
</details>
https://github.com/llvm/llvm-project/pull/73928
More information about the cfe-commits
mailing list