[PATCH] D134617: [HLSL] Support register binding attribute on global variable

Xiang Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 4 13:21:49 PDT 2022


python3kgae marked an inline comment as done.
python3kgae added inline comments.


================
Comment at: clang/include/clang/Parse/Parser.h:2817-2818
 
+  void MaybeParseHLSLSemantics(Declarator &D,
+                               SourceLocation *EndLoc = nullptr) {
+    if (Tok.is(tok::colon)) {
----------------
aaron.ballman wrote:
> aaron.ballman wrote:
> > Let's assert we're in HLSL mode here so that we don't accidentally call this from non-HLSL parsing contexts.
> Precommit CI finds a way to trigger this assert, so it looks like we caught a case we didn't know about (yay asserts!).
Yeah. Pre-commit CI is really cool. :)

It would be nice if there's an optional config so we can let it test experimental targets too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134617/new/

https://reviews.llvm.org/D134617



More information about the cfe-commits mailing list