[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-07-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Posted an update in rGa6e63e35ede4 , which removes the not-fully-implemented RTTI bits, and adds an extra test case to cover instantiation errors. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-07-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Giving the posthumous review my LGTM so it's clear. :-) Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:41-44 + auto *UsingDecl = UsingDirectiveDecl::Create( + AST, AST.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), +

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-07-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:41-44 + auto *UsingDecl = UsingDirectiveDecl::Create( + AST, AST.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), + NestedNameSpecifierLoc(), SourceLocation(),

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-07-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D128012#3630680 , @beanz wrote: > @aaron.ballman, I just had a total brain-asleep moment, and pushed this > without realizing that I had feedback from you. Are you okay with me > addressing that most-commit or would

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-07-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Headers/hlsl/hlsl_basic_types.h:30 #ifdef __HLSL_ENABLE_16_BIT -typedef int16_t int16_t2 __attribute__((ext_vector_type(2))); -typedef int16_t int16_t3 __attribute__((ext_vector_type(3))); -typedef int16_t int16_t4

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-07-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. @aaron.ballman, I just had a total brain-asleep moment, and pushed this without realizing that I had feedback from you. Are you okay with me addressing that most-commit or would you prefer a revert? Huge apologies... Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-07-05 Thread Chris Bieneman 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 rGb8dbc6ffea93: [HLSL] Add ExternalSemaSource vector alias (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-07-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/HLSLExternalSemaSource.h:22 +class HLSLExternalSemaSource : public ExternalSemaSource { + static char ID; + It looks like you're missing the `classof` and `isA` support that actually uses

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-07-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov accepted this revision. mizvekov added a comment. This revision is now accepted and ready to land. This looks reasonable, LGTM for what it's worth :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128012/new/

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-07-01 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 441759. beanz added a comment. Updates based on review feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128012/new/ https://reviews.llvm.org/D128012 Files:

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-07-01 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:52 + + llvm::SmallVector TemplateArgs; + Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128012/new/

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-07-01 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. gentle ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128012/new/ https://reviews.llvm.org/D128012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-21 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D128012#3598307 , @Anastasia wrote: > PCH have large in-memory size compared to the sources, but if it's not an > issue then it should be reasonable. Yea... I think we may have some flexibility on memory size. Our current

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D128012#3592126 , @beanz wrote: > In D128012#3592098 , @Anastasia > wrote: > >> aha, are you having a lot of these types then? Ok that sounds similar >> problem to OpenCL builtin

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D128012#3592098 , @Anastasia wrote: > aha, are you having a lot of these types then? Ok that sounds similar problem > to OpenCL builtin functions as we had to go away from a simple header include > due to long parsing time.

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D128012#3591828 , @beanz wrote: > For just the type alias, adding it during parsing would probably work. Where > things get more complicated is we have a whole mess of other data types that > we’ll need to add too

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. For just the type alias, adding it during parsing would probably work. Where things get more complicated is we have a whole mess of other data types that we’ll need to add too eventually. One of the advantages of using an external sema source is that we can create

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I wonder if accepting type alias with identifier `vector` while parsing would be simpler to implement? Then you could just add those type aliases into the internal header. I assume user code is not allowed to redefine those i.e. it would result in undefined behavior

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-16 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Frontend/FrontendAction.cpp:1022 +new HLSLExternalSemaSource()); +CI.getASTContext().setExternalSource(HLSLSema); + } python3kgae wrote: > Does this mean features like PCH which use ExternalSource

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-16 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Frontend/FrontendAction.cpp:1022 +new HLSLExternalSemaSource()); +CI.getASTContext().setExternalSource(HLSLSema); + } Does this mean features like PCH which use ExternalSource will not work

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-16 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, kuhar, bogner, rnk, python3kgae. Herald added subscribers: Anastasia, jeroen.dobbelaere, mgorny. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. HLSL vector types are ext_vector