llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Hardik Kumar (hardikxk)

<details>
<summary>Changes</summary>

The patch intialised the  pointer to a .
Previously the pointer would have some garbage value which might have resulted 
in UB.

closes #<!-- -->210034

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


1 Files Affected:

- (modified) clang/include/clang/AST/CommentLexer.h (+1-1) 


``````````diff
diff --git a/clang/include/clang/AST/CommentLexer.h 
b/clang/include/clang/AST/CommentLexer.h
index 194a31cb7b934..7e224f4d4cfb2 100644
--- a/clang/include/clang/AST/CommentLexer.h
+++ b/clang/include/clang/AST/CommentLexer.h
@@ -240,7 +240,7 @@ class Lexer {
 
   /// One past end pointer for the current comment.  For BCPL comments points
   /// to newline or BufferEnd, for C comments points to star in '*/'.
-  const char *CommentEnd;
+  const char *CommentEnd{nullptr};
 
   SourceLocation FileLoc;
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/210067
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to