[clang] [clang] Report narrowing conversions with const references (PR #75332)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 13 04:47:57 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 e418988175c2dee9d7c7976cf822b41aaf321c26 d0a7276eb8014693656d3d931616d56ffe46730c -- clang/test/SemaCXX/GH63151.cpp clang/lib/Sema/SemaInit.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 7ff1b55d1f..b7ded88940 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -4424,16 +4424,11 @@ ResolveOverloadedFunctionForReferenceBinding(Sema &S,
return false;
}
-static void TryReferenceInitializationCore(Sema &S,
- const InitializedEntity &Entity,
- const InitializationKind &Kind,
- Expr *Initializer,
- QualType cv1T1, QualType T1,
- Qualifiers T1Quals,
- QualType cv2T2, QualType T2,
- Qualifiers T2Quals,
- InitializationSequence &Sequence,
- bool TopLevelOfInitList);
+static void TryReferenceInitializationCore(
+ Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind,
+ Expr *Initializer, QualType cv1T1, QualType T1, Qualifiers T1Quals,
+ QualType cv2T2, QualType T2, Qualifiers T2Quals,
+ InitializationSequence &Sequence, bool TopLevelOfInitList);
static void TryValueInitialization(Sema &S,
const InitializedEntity &Entity,
@@ -4985,16 +4980,11 @@ static bool isNonReferenceableGLValue(Expr *E) {
///
/// We also can get here in C if we call a builtin which is declared as
/// a function with a parameter of reference type (such as __builtin_va_end()).
-static void TryReferenceInitializationCore(Sema &S,
- const InitializedEntity &Entity,
- const InitializationKind &Kind,
- Expr *Initializer,
- QualType cv1T1, QualType T1,
- Qualifiers T1Quals,
- QualType cv2T2, QualType T2,
- Qualifiers T2Quals,
- InitializationSequence &Sequence,
- bool TopLevelOfInitList) {
+static void TryReferenceInitializationCore(
+ Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind,
+ Expr *Initializer, QualType cv1T1, QualType T1, Qualifiers T1Quals,
+ QualType cv2T2, QualType T2, Qualifiers T2Quals,
+ InitializationSequence &Sequence, bool TopLevelOfInitList) {
QualType DestType = Entity.getType();
SourceLocation DeclLoc = Initializer->getBeginLoc();
``````````
</details>
https://github.com/llvm/llvm-project/pull/75332
More information about the cfe-commits
mailing list