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 HEAD~1 HEAD --extensions cpp,h -- clang/lib/CodeGen/CGCUDANV.cpp clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGHLSLRuntime.cpp clang/lib/CodeGen/CGObjCGNU.cpp clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/CodeGenModule.h `````````` </details> <details> <summary> View the diff from clang-format here. </summary> ``````````diff diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 94bb5919a..f2d0c8c31 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -3447,8 +3447,7 @@ LValue CodeGenFunction::EmitPredefinedLValue(const PredefinedExpr *E) { auto C = CGM.GetAddrOfConstantCString(Name, GVName); return MakeAddrLValue(C, E->getType(), AlignmentSource::Decl); } else { - auto C = - CGM.GetAddrOfConstantCString(std::string(FnName), GVName); + auto C = CGM.GetAddrOfConstantCString(std::string(FnName), GVName); return MakeAddrLValue(C, E->getType(), AlignmentSource::Decl); } } diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index f593ea1bb..b01ffa86c 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -6920,8 +6920,8 @@ CodeGenModule::GetAddrOfConstantStringFromObjCEncode(const ObjCEncodeExpr *E) { /// GetAddrOfConstantCString - Returns a pointer to a character array containing /// the literal and a terminating '\0' character. /// The result has pointer to array type. -ConstantAddress CodeGenModule::GetAddrOfConstantCString( - const std::string &Str, StringRef GlobalName) { +ConstantAddress CodeGenModule::GetAddrOfConstantCString(const std::string &Str, + StringRef GlobalName) { StringRef StrWithNull(Str.c_str(), Str.size() + 1); CharUnits Alignment = getContext().getAlignOfGlobalVarInChars( getContext().CharTy, /*VD=*/nullptr); diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 92e4641a4..edf0c4e04 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1185,9 +1185,8 @@ public: /// /// \param GlobalName If provided, the name to use for the global (if one is /// created). - ConstantAddress - GetAddrOfConstantCString(const std::string &Str, - StringRef GlobalName = ".str"); + ConstantAddress GetAddrOfConstantCString(const std::string &Str, + StringRef GlobalName = ".str"); /// Returns a pointer to a constant global variable for the given file-scope /// compound literal expression. `````````` </details> https://github.com/llvm/llvm-project/pull/154179 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits