[all-commits] [llvm/llvm-project] a1ed82: [TableGen] Simplify prepSkipToLineEnd for preproce...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Thu Feb 8 10:56:13 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a1ed821b49d9a189c3a0a11228c0de517020feca
https://github.com/llvm/llvm-project/commit/a1ed821b49d9a189c3a0a11228c0de517020feca
Author: Fangrui Song <i at maskray.me>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M llvm/lib/TableGen/TGLexer.cpp
M llvm/lib/TableGen/TGLexer.h
Log Message:
-----------
[TableGen] Simplify prepSkipToLineEnd for preprocessing
The MemoryBuffer is created using `RequiresNullTerminator`, so we can
safely skip the `CurPtr != CurBuf.end()` check. The redundant check
causes a cppcheck report. In addition, elsewhere, including `*CurPtr ==
'#'` below, makes the null terminator assumption as well.
Close #81120
More information about the All-commits
mailing list