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

Kazu Hirata via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 21 11:27:20 PDT 2022


kazu added a comment.

In D129883#3806507 <https://reviews.llvm.org/D129883#3806507>, @python3kgae wrote:

> In D129883#3806393 <https://reviews.llvm.org/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,-Wsuggest-override]
>>   clang/lib/Parse/ParseHLSL.cpp:76:20: error: unused variable 'Loc' [-Werror,-Wunused-variable]
>>   clang/lib/CodeGen/CGDecl.cpp:48:11: error: enumeration value 'HLSLBuffer' not handled in switch [-Werror,-Wswitch]
>>
>> I could fix the first two, but I don't know what should be done for the last one.  Would you mind taking a look?
>>
>> FWIW, I'm using clang-14.0.0.6 as the hot compiler with a cmake flag `-DLLVM_ENABLE_WERROR=On`.
>
> Fixed with https://github.com/llvm/llvm-project/commit/a7e3de2450f5b62e7dfe8999443f15be5dfec0b0
> Thanks for the help.
> I will switch to clang in the future.

Thank you so much for fixing this quickly!

By the way, after your fix, I am getting:

  clang/tools/libclang/CIndex.cpp:6648:11: error: enumeration value 'HLSLBuffer' not handled in switch [-Werror,-Wswitch]

Sorry for not listing all the warnings in my first message.  (I thought I listed them all...) Should we add something like this?

  case Decl::HLSLBuffer:
    return clang_getNullCursor();


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129883



More information about the cfe-commits mailing list