[flang-commits] [clang] [flang] [llvm] [flang] Improve the error message for the option "-fconvert" with allowed values (PR #215966)
Kiran Kumar T P via flang-commits
flang-commits at lists.llvm.org
Thu Aug 27 21:39:08 PDT 2026
================
@@ -10,6 +10,7 @@
! RUN: %flang -### -fconvert=big-endian %s 2>&1 | FileCheck %s --check-prefix=VALID
! RUN: %flang -### -fconvert=swap %s 2>&1 | FileCheck %s --check-prefix=VALID
! RUN: not %flang -fconvert=foobar %s 2>&1 | FileCheck %s --check-prefix=INVALID
+! RUN: not %flang -fconvert=big_endian %s 2>&1 | FileCheck %s --check-prefix=INVALID-BIG-ENDIAN
----------------
kiranktp wrote:
Oops I am not paying enough attention I guess. Apologies for that. Let me clarify.
For "-fconver=foobar", the value used is entirely different from the list of values allowed.
in "-fconvert=big_endian", here there is a typo in the value being used.
The whole requirement to improve the error message started from a request to suggest a correct value when there is a typo in the values being used. But this would mean check for type in each value and suggest a nearby correct value. That would be too much ask for.
So added a test to just show we get the same error when there is a typo in the value being used.
If this is a duplicate then i can remove the same.
https://github.com/llvm/llvm-project/pull/215966
More information about the flang-commits
mailing list