-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorbugzillaIssues migrated from bugzillaIssues migrated from bugzillacclang-formatgood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Description
Bugzilla Link | 47571 |
Version | unspecified |
OS | All |
Extended Description
This is my configuration file:
---
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AllowShortIfStatementsOnASingleLine: false
BasedOnStyle: LLVM
BreakBeforeBraces: WebKit
ColumnLimit: 0
IndentWidth: 4
IndentCaseLabels: false
Language: Cpp
TabWidth: 4
UseTab: Never
This is part of my code, it has been formatted:
/* linkedlist.h */
#ifndef LINKEDLIST_H
#define LINKEDLIST_H
typedef struct node *link;
struct node {
unsigned char item;
link next;
};
link make_node(unsigned char item);
void free_node(link p);
link search(unsigned char key);
void insert(link p);
void delete (link p);
void traverse(void (*visit)(link));
void destroy(void);
void push(link p);
link pop(void);
#endif
In theory, my delete
function declaration should be formatted as: void delete(link p)
;
However, the formatter added a space between delete
and (
. This seems to treat my delete
signature as a keyword.
This is wrong for C code.
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorbugzillaIssues migrated from bugzillaIssues migrated from bugzillacclang-formatgood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute