Skip to content

clang-tidy readability-redundant-control-flow removes comments and conditional compilation blocks before the return statement #171200

@bobtista

Description

@bobtista

It seems that everything between the last normal line in a code block and the closing brace is deleted, including things that should not be touched. Examples:

Bigger problem (conditional compilation block):

-#if defined(RTS_DEBUG)
-       m_networkOn = TRUE;
-#endif
-
-       return;
- 

Annoying problem (Comments removed)

-       //{{AFX_DATA_MAP(CBackgroundBMPDialog)
-               // NOTE: the ClassWizard will add DDX and DDV calls here
-       //}}AFX_DATA_MAP
-    return ;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions