[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 5 13:50:09 PST 2023
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 d6fbd96e5eaf3e8acbf1b43dce7a311352907567 1140e0094137614ad9917276f5324cbea4f2e0f9 -- clang/test/SemaTemplate/instantiate-pure-virtual-function.cpp clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 5611bb6f5b..a034de0697 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -4953,7 +4953,7 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
} else if (TSK == TSK_ImplicitInstantiation) {
if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() &&
!getSourceManager().isInSystemHeader(PatternDecl->getBeginLoc()) &&
- !Function->isPure()) {
+ !Function->isPure()) {
Diag(PointOfInstantiation, diag::warn_func_template_missing)
<< Function;
Diag(PatternDecl->getLocation(), diag::note_forward_template_decl);
``````````
</details>
https://github.com/llvm/llvm-project/pull/74510
More information about the cfe-commits
mailing list