[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D129883#3806552 , @kazu wrote: > In D129883#3806507 , @python3kgae > wrote: > >> In D129883#3806393 , @kazu wrote: >> >>> This patch seems

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-21 Thread Kazu Hirata via Phabricator via cfe-commits
kazu added a comment. In D129883#3806507 , @python3kgae wrote: > In D129883#3806393 , @kazu wrote: > >> This patch seems to cause several warnings: >> >> clang/include/clang/AST/Decl.h:4696:15: error: 'getSourc

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D129883#3806393 , @kazu wrote: > This patch seems to cause several warnings: > > clang/include/clang/AST/Decl.h:4696:15: error: 'getSourceRange' overrides a > member function but is not marked 'override' [-Werror,-Wsugge

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D129883#3806393 , @kazu wrote: > This patch seems to cause several warnings: > > clang/include/clang/AST/Decl.h:4696:15: error: 'getSourceRange' overrides a > member function but is not marked 'override' [-Werror,-Wsugge

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-21 Thread Kazu Hirata via Phabricator via cfe-commits
kazu added a comment. This patch seems to cause several warnings: clang/include/clang/AST/Decl.h:4696:15: error: 'getSourceRange' overrides a member function but is not marked 'override' [-Werror,-Wsuggest-override] clang/lib/Parse/ParseHLSL.cpp:76:20: error: unused variable 'Loc' [-Werror,

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG782ac2182c2b: [HLSL] Support cbuffer/tbuffer for hlsl. (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-20 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461751. python3kgae added a comment. Rebase for the PCH fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://reviews.llvm.org/D129883 Files: clang/include/clang/AST/Decl.h clang/inclu

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://reviews.llvm.org/D129883

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:79-80 +ParsedAttributes Attrs(AttrFactory); +MaybeParseCXX11Attributes(Attrs); +MaybeParseMicrosoftAttributes(Attrs); + beanz wrote: > aaron.ballman wrote: > > beanz wrote: >

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 459090. python3kgae added a comment. Remove attribute for first cbuffer commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://reviews.llvm.org/D129883 Files: clang/include/clang/AST/D

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:79-80 +ParsedAttributes Attrs(AttrFactory); +MaybeParseCXX11Attributes(Attrs); +MaybeParseMicrosoftAttributes(Attrs); + aaron.ballman wrote: > beanz wrote: > > aaron.ballman wrote:

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:79-80 +ParsedAttributes Attrs(AttrFactory); +MaybeParseCXX11Attributes(Attrs); +MaybeParseMicrosoftAttributes(Attrs); + beanz wrote: > aaron.ballman wrote: > > beanz wrote:

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:79-80 +ParsedAttributes Attrs(AttrFactory); +MaybeParseCXX11Attributes(Attrs); +MaybeParseMicrosoftAttributes(Attrs); + aaron.ballman wrote: > beanz wrote: > > python3kgae wrote: >

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:79-80 +ParsedAttributes Attrs(AttrFactory); +MaybeParseCXX11Attributes(Attrs); +MaybeParseMicrosoftAttributes(Attrs); + beanz wrote: > python3kgae wrote: > > aaron.ballman

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-08 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:79-80 +ParsedAttributes Attrs(AttrFactory); +MaybeParseCXX11Attributes(Attrs); +MaybeParseMicrosoftAttributes(Attrs); + python3kgae wrote: > aaron.ballman wrote: > > Just double-ch

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-08 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:79-80 +ParsedAttributes Attrs(AttrFactory); +MaybeParseCXX11Attributes(Attrs); +MaybeParseMicrosoftAttributes(Attrs); + aaron.ballman wrote: > Just double-checking, but this

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-08 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 458807. python3kgae marked 4 inline comments as done. python3kgae added a comment. Use cast to simplify code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://reviews.llvm.org/D129883 File

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. (I didn't have the chance to do a complete review, but I did a partial one and spotted some things) Comment at: clang/lib/Parse/ParseHLSL.cpp:79-80 +ParsedAttributes Attrs(AttrFactory); +MaybeParseCXX11Attributes(Attrs); +MaybeParseMi

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-07 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 7 inline comments as done. python3kgae added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:59 + +switch (Tok.getKind()) { +case tok::kw_namespace: aaron.ballman wrote: > The approach of using a switch and handling individua

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-07 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 458585. python3kgae marked 14 inline comments as done. python3kgae added a comment. Parse first and report error on the generated AST. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://revie

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for the update, this is heading in a good direction! I think there's still a lot of test coverage missing. Consider: namespace Name { cbuffer a { int x; } } struct S { cbuffer what { int y; } }; void func() { tbuffer

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-08-25 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 5 inline comments as done. python3kgae added inline comments. Comment at: clang/lib/AST/Decl.cpp:5228-5230 + if (DC != LexicalParent) { +Result->setLexicalDeclContext(LexicalParent); + } aaron.ballman wrote: > So semantically these are al

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-08-25 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 455672. python3kgae marked 10 inline comments as done. python3kgae added a comment. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. Add more comment about no name conflict for cbuffer. Add Serialize and JSON dump for HLSLBufferDecl

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-08-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. There's a whole ton of test coverage missing from this (no actual sema tests, no AST dumping tests for text or JSON) not to mention a ton of situational tests that are

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-08-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452761. python3kgae marked 3 inline comments as done. python3kgae added a comment. Add more comment about no name conflict for cbuffer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://revi

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-08-08 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Since this is adding a new AST node (hopefully the only one we need in HLSL) it would be nice to get @aaron.ballman to take a look here too to make sure this isn't too insane. Comment at: clang/lib/AST/DeclBase.cpp:1191 + if (getDeclKind() == Decl::H

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-07-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 2 inline comments as done. python3kgae added inline comments. Comment at: clang/test/SemaHLSL/cbuffer_tbuffer.hlsl:1 +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s + beanz wrote: > This look

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-07-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 445162. python3kgae added a comment. Code cleanup and add test for error case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://reviews.llvm.org/D129883 Files: clang/include/clang/AST/De

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-07-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Parse/Parser.h:2820 SourceLocation *EndLoc = nullptr); + Decl *ParseCTBuffer(SourceLocation &DeclEnd, + SourceLocation InlineLoc = SourceLocation()); nit

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-07-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: svenvh, asavonic, beanz, pow2clk, Anastasia, aaron.ballman. Herald added a subscriber: mgorny. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-c