[clang] [NFC][clang] cleanup dead code (PR #164977)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 24 06:11:08 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Nathan Gauër (Keenuts)
<details>
<summary>Changes</summary>
Dead code probably left-over of some PR refactoring.
---
Full diff: https://github.com/llvm/llvm-project/pull/164977.diff
1 Files Affected:
- (modified) clang/lib/Parse/ParseHLSL.cpp (-6)
``````````diff
diff --git a/clang/lib/Parse/ParseHLSL.cpp b/clang/lib/Parse/ParseHLSL.cpp
index 51f2aef869649..c727ee3a1f1a6 100644
--- a/clang/lib/Parse/ParseHLSL.cpp
+++ b/clang/lib/Parse/ParseHLSL.cpp
@@ -126,15 +126,9 @@ Parser::ParsedSemantic Parser::ParseHLSLSemantic() {
// semantic index. The semantic index is the number at the end of
// the semantic, including leading zeroes. Digits located before
// the last letter are part of the semantic name.
- bool Invalid = false;
SmallString<256> Buffer;
Buffer.resize(Tok.getLength() + 1);
StringRef Identifier = PP.getSpelling(Tok, Buffer);
- if (Invalid) {
- Diag(Tok.getLocation(), diag::err_expected_semantic_identifier);
- return {};
- }
-
assert(Identifier.size() > 0);
// Determine the start of the semantic index.
unsigned IndexIndex = Identifier.find_last_not_of("0123456789") + 1;
``````````
</details>
https://github.com/llvm/llvm-project/pull/164977
More information about the cfe-commits
mailing list