Skip to content

Commit 82d07ee

Browse files
committed
[flang] Correct file type for .FOR extension
Although not standard, Fortran upper-case extensions generally indicate files that require preprocessing. This convention holds for most cases in `clang/lib/Driver/Types.cpp`, except for `.FOR`. This commit fixes the inconsistency by ensuring `.FOR` files are correctly identified as `TY_Fortran`, aligning their behavior with other upper-case Fortran extensions.
1 parent 2696271 commit 82d07ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Driver/Types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ types::ID types::lookupTypeForExtension(llvm::StringRef Ext) {
345345
.Case("F95", TY_Fortran)
346346
.Case("f95", TY_PP_Fortran)
347347
.Case("for", TY_PP_Fortran)
348-
.Case("FOR", TY_PP_Fortran)
348+
.Case("FOR", TY_Fortran)
349349
.Case("fpp", TY_Fortran)
350350
.Case("FPP", TY_Fortran)
351351
.Case("gch", TY_PCH)

0 commit comments

Comments
 (0)