-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[CIR][NFC] Fix an unused variable warning #138110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) ChangesThis fixes a warning where a variable assigned in 'if' statement wasn't referenced again. Full diff: https://github.com/llvm/llvm-project/pull/138110.diff 1 Files Affected:
diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
index fa86fce2f6e5c..a424f7abd05c0 100644
--- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
@@ -519,7 +519,7 @@ LValue CIRGenFunction::emitLValue(const Expr *e) {
return emitBinaryOperatorLValue(cast<BinaryOperator>(e));
case Expr::CompoundAssignOperatorClass: {
QualType ty = e->getType();
- if (const AtomicType *at = ty->getAs<AtomicType>()) {
+ if (ty->getAs<AtomicType>()) {
cgm.errorNYI(e->getSourceRange(),
"CompoundAssignOperator with AtomicType");
return LValue();
|
@llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) ChangesThis fixes a warning where a variable assigned in 'if' statement wasn't referenced again. Full diff: https://github.com/llvm/llvm-project/pull/138110.diff 1 Files Affected:
diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
index fa86fce2f6e5c..a424f7abd05c0 100644
--- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
@@ -519,7 +519,7 @@ LValue CIRGenFunction::emitLValue(const Expr *e) {
return emitBinaryOperatorLValue(cast<BinaryOperator>(e));
case Expr::CompoundAssignOperatorClass: {
QualType ty = e->getType();
- if (const AtomicType *at = ty->getAs<AtomicType>()) {
+ if (ty->getAs<AtomicType>()) {
cgm.errorNYI(e->getSourceRange(),
"CompoundAssignOperator with AtomicType");
return LValue();
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/21423 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/17089 Here is the relevant piece of the build log for the reference
|
This fixes a warning where a variable assigned in 'if' statement wasn't referenced again.