Skip to content

[Flang] Fix grammar in pointer assignment error message #150909

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

Closed
wants to merge 1 commit into from

Conversation

Sekar-C-Mca
Copy link

This PR corrects a grammatical mistake in an error message emitted during pointer assignment checks in Flang.
The message previously read:

"%s is associated with the result of a reference to function '%s' that is a not a pointer"

The extra "a" before "not a pointer" has been removed.

Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:semantics labels Jul 28, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 28, 2025

@llvm/pr-subscribers-flang-semantics

Author: Sekar (Sekar-C-Mca)

Changes

This PR corrects a grammatical mistake in an error message emitted during pointer assignment checks in Flang.
The message previously read:

"%s is associated with the result of a reference to function '%s' that is a not a pointer"

The extra "a" before "not a pointer" has been removed.


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

1 Files Affected:

  • (modified) flang/lib/Semantics/pointer-assignment.cpp (+1-1)
diff --git a/flang/lib/Semantics/pointer-assignment.cpp b/flang/lib/Semantics/pointer-assignment.cpp
index 090876912138a..47973cca35654 100644
--- a/flang/lib/Semantics/pointer-assignment.cpp
+++ b/flang/lib/Semantics/pointer-assignment.cpp
@@ -281,7 +281,7 @@ bool PointerAssignmentChecker::Check(const evaluate::FunctionRef<T> &f) {
           " function '%s' that is a procedure pointer"_err_en_US;
   } else if (!funcResult->attrs.test(FunctionResult::Attr::Pointer)) {
     msg = "%s is associated with the result of a reference to function '%s'"
-          " that is a not a pointer"_err_en_US;
+          " that is not a pointer"_err_en_US;
   } else if (isContiguous_ &&
       !funcResult->attrs.test(FunctionResult::Attr::Contiguous)) {
     auto restorer{common::ScopedSet(lhs_, symbol)};

Copy link
Contributor

@tarunprabhu tarunprabhu left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@Sekar-C-Mca
Copy link
Author

@tarunprabhu
I had already commented on this issue and submitted a PR earlier. Later, another contributor self-assigned and raised a duplicate PR #150864. I'm new to open source — just wanted to check if this is something I should be concerned about, or if there's a standard way to handle such cases. Appreciate your guidance!

@tarunprabhu
Copy link
Contributor

tarunprabhu commented Jul 29, 2025

@Sekar-C-Mca, thanks for the PR. This does happen sometimes.

Closing in favor of #151029

@tarunprabhu
Copy link
Contributor

@Sekar-C-Mca

It is usually better to ask if anyone is working on an issue before you provide a fix for it. For something small, it is not unreasonable to just provide a PR, but you risk someone else fixing it themselves as has happened here. You could also assign the issue to yourself which signals to others that you are actively working on it.

However, every project is different, and some will not allow just anyone to assign issues to themselves. Others have more defined processes to contribute code. So there isn't one fixed approach that will work everywhere.

Hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:semantics flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants