Skip to content

[Format] Regression in clang-format - -dump_config < path/to/objc_file.m (now outputs Language: Cpp) #79023

Closed
@bhamiltoncx

Description

@bhamiltoncx

clang-format - -dump_config < path/to/objc_file.m no longer works as of 3791b3f (it now outputs Language: Cpp instead of Language: ObjC):

% cat /tmp/objc_file.m
#import <Foundation/Foundation.h>

@interface Foo : NSObject
- (void)doStuff;
@end;

@implementation Foo
@end

% ./build/bin/clang-format --version
clang-format version 18.0.0git (https://github.com/llvm/llvm-project.git 3791b3fca6eac5e403b91550ed0f774866cf3ede)

% ./build/bin/clang-format - -dump-config < /tmp/objc_file.m | grep -e '^Language'
Language:        Cpp

This should say Language: ObjC.

The issue does not reproduce if I locally revert that change or go to its parent 9810fe1:

% ./build/bin/clang-format --version
clang-format version 18.0.0git (https://github.com/llvm/llvm-project.git 9810fe1a91eb9ce18246fb1528232a539dbd37fc)
% ./build/bin/clang-format - -dump-config < /tmp/objc_file.m | grep -e '^Language'
Language:        ObjC

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions