Skip to content

Conversation

@Keenuts
Copy link
Contributor

@Keenuts Keenuts commented Oct 24, 2025

Dead code probably left-over of some PR refactoring.

Dead code probably left-over of some PR refactoring.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" HLSL HLSL Language Support labels Oct 24, 2025
@Keenuts Keenuts enabled auto-merge (squash) October 24, 2025 13:11
@llvmbot
Copy link
Member

llvmbot commented Oct 24, 2025

@llvm/pr-subscribers-hlsl

@llvm/pr-subscribers-clang

Author: Nathan Gauër (Keenuts)

Changes

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 --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;

@Keenuts Keenuts requested a review from s-perron October 24, 2025 13:15
@Keenuts Keenuts merged commit f6d8f55 into llvm:main Oct 24, 2025
13 of 15 checks passed
Copy link
Collaborator

@shafik shafik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick follow-up!

@Keenuts Keenuts deleted the nfc-deadcode branch October 24, 2025 15:57
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
Dead code probably left-over of some PR refactoring.
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 HLSL HLSL Language Support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants