Skip to content
Snippets Groups Projects
  • Vassil Vassilev's avatar
    68a8a335
    Do not confuse clang-format. · 68a8a335
    Vassil Vassilev authored
    ClassImp is a macro defined in Rtypes.h. It can be written without trailing
    semicolon. However, clang-format is based on lexing and it doesn't know at
    all about preprocessors and how to expand macros. When visiting ClassImp(X)
    it thinks this is not a completed entity (as it doesn't expand macros) and
    considers the next line as continuation of the previous.
    
    Inserting a semicolon fixes the issue and makes formatting with clang-format
    in the ROOT codebase less tricky.
    68a8a335
    History
    Do not confuse clang-format.
    Vassil Vassilev authored
    ClassImp is a macro defined in Rtypes.h. It can be written without trailing
    semicolon. However, clang-format is based on lexing and it doesn't know at
    all about preprocessors and how to expand macros. When visiting ClassImp(X)
    it thinks this is not a completed entity (as it doesn't expand macros) and
    considers the next line as continuation of the previous.
    
    Inserting a semicolon fixes the issue and makes formatting with clang-format
    in the ROOT codebase less tricky.