Skip to content

[flang] Fix compiler warning #99306

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

Merged
merged 1 commit into from
Jul 17, 2024
Merged

[flang] Fix compiler warning #99306

merged 1 commit into from
Jul 17, 2024

Conversation

tblah
Copy link
Contributor

@tblah tblah commented Jul 17, 2024

No description provided.

@tblah tblah changed the title Fix compiler warning [flang] Fix compiler warning Jul 17, 2024
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Jul 17, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 17, 2024

@llvm/pr-subscribers-flang-fir-hlfir

Author: Tom Eccles (tblah)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/99306.diff

1 Files Affected:

  • (modified) flang/lib/Optimizer/Builder/IntrinsicCall.cpp (+1-1)
diff --git a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
index e12e21bb00e15..ba71fb3b4040c 100644
--- a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
+++ b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
@@ -6148,7 +6148,7 @@ IntrinsicLibrary::genScan(mlir::Type resultType,
 fir::ExtendedValue
 IntrinsicLibrary::genSecond(std::optional<mlir::Type> resultType,
                             mlir::ArrayRef<fir::ExtendedValue> args) {
-  assert(args.size() == 1 && !resultType || args.empty() && resultType);
+  assert((args.size() == 1 && !resultType) || (args.empty() && resultType));
 
   fir::ExtendedValue result;
 

Copy link
Contributor

@kiranchandramohan kiranchandramohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG.

@tblah tblah merged commit 850a2e6 into llvm:main Jul 17, 2024
8 of 9 checks passed
@tblah tblah mentioned this pull request Jul 17, 2024
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary: 

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60251725
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants