Skip to content

[clang-tidy] readability-braces-around-statements not detected else containing if without braces #143348

Open
@GINN-Imp

Description

@GINN-Imp

https://godbolt.org/z/3TKjKen34

int a,b,c;
int main(){
    if(a){
        c=1;
    }
    else                                //The expected warning position
        if(b){ c = 0; }

    return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-tidyenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions