[clang] [HLSL] Disallow virtual inheritance and functions (PR #127346)

via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 15 12:41:04 PST 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 50581ef1ee45815b9230043319de5ae93680d4ad e62dc4bfc4f1cff2a624caf70fcc7bb0dc4a6236 --extensions cpp -- clang/lib/Parse/ParseDecl.cpp clang/lib/Parse/ParseDeclCXX.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index dfa2dbf5ab..eb72fb892b 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -4415,8 +4415,7 @@ void Parser::ParseDeclarationSpecifiers(
         DiagID = diag::err_hlsl_virtual_function;
         PrevSpec = Tok.getIdentifierInfo()->getNameStart();
         isInvalid = true;
-      }
-      else {
+      } else {
         isInvalid = DS.setFunctionSpecVirtual(Loc, PrevSpec, DiagID);
       }
       break;

``````````

</details>


https://github.com/llvm/llvm-project/pull/127346


More information about the cfe-commits mailing list