[clang] [clang] Add fixit for using declaration with a (qualified) namespace (PR #94762)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 7 08:24:37 PDT 2024
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 fc95645e37f244c2fc155f1ee51047f90329e8c1 2cbc9f7e066066ffb04480be6bd7e19855086b80 -- clang/lib/Sema/SemaDeclCXX.cpp clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx11.cpp clang/test/CXX/drs/cwg4xx.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index b5ffa75f04..dad1f9d0d7 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -13082,7 +13082,7 @@ NamedDecl *Sema::BuildUsingDeclaration(
<< SS.getRange();
// Suggest using 'using namespace ...' instead.
Diag(SS.getBeginLoc(), diag::note_namespace_using_decl)
- << FixItHint::CreateInsertion(SS.getBeginLoc(), "namespace ");
+ << FixItHint::CreateInsertion(SS.getBeginLoc(), "namespace ");
return BuildInvalid();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/94762
More information about the cfe-commits
mailing list