Skip to content

Conversation

@bricknerb
Copy link
Contributor

I believe this has no effect current behavior but would make code safer in case we forget to initialize this.

I believe this has no effect current behavior but would make code safer in case we forget to initialize this.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Oct 30, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 30, 2024

@llvm/pr-subscribers-clang

Author: Boaz Brickner (bricknerb)

Changes

I believe this has no effect current behavior but would make code safer in case we forget to initialize this.


Full diff: https://github.com/llvm/llvm-project/pull/114198.diff

1 Files Affected:

  • (modified) clang/include/clang/AST/Decl.h (+1-1)
diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index 7ff35d73df5997..8c39ef3d5a9fa6 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -737,7 +737,7 @@ class DeclaratorDecl : public ValueDecl {
   // qualifier, to be used for the (uncommon) case of out-of-line declarations
   // and constrained function decls.
   struct ExtInfo : public QualifierInfo {
-    TypeSourceInfo *TInfo;
+    TypeSourceInfo *TInfo = nullptr;
     Expr *TrailingRequiresClause = nullptr;
   };
 

@bricknerb bricknerb requested a review from Sirraide November 4, 2024 08:17
@bricknerb bricknerb merged commit bf43a13 into llvm:main Nov 5, 2024
11 checks passed
@bricknerb bricknerb deleted the ExtInfo.TInfo branch November 6, 2024 08:59
PhilippRados pushed a commit to PhilippRados/llvm-project that referenced this pull request Nov 6, 2024
I believe this has no effect current behavior but would make code safer
in case we forget to initialize this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants