title: How to disable clang-format settings affecting macros?
body: <p>In a clang-format settings/style file, the settings are chosen to be in accordance to the accepted style-guide lines for <em>functions</em>. However, it also formats the <em>macros</em>. I would like to have <em>macros</em> not to be formatted while <em>functions</em> are formatted according to the settings. How do I achieve the desired format?</p>
  
  <p><strong>I have this:</strong></p>
  
  <pre><code>//macros
  #define RET         printf("\n")
  #define TAB         printf("\t")
  #define QUERY                    \
    {                              \
      char c;                      \
      if(!NoQUERYS) {              \
        printf("Continue (Y/N)?"); \
        c = toupper(_getch());     \
        RET;                       \
        if(c != 'Y') exit(1);      \    //looks not good(takes too much space)
      }                            \
    }
  #define PRESSKEY                            \
    {                                         \
      char c;                                 \
      if(!NoQUERYS) {                         \
        printf("Press any key to continue."); \
        c = _getch();                         \
        RET;                                  \
      }                                       \
    }
  
  //function
  int fwind2param(FILE* txt)  
  {               
    while( !feof(txt) ){   //looks good
      fgets( s, 255, txt );
    }
  }
  </code></pre>
  
  <p><strong>I want this:</strong></p>
  
  <pre><code>//macros
  #define RET         printf("\n")
  #define TAB         printf("\t")
  #define QUERY       {char c; if(!NoQUERYS){ printf( "Continue (Y/N)?" );c=toupper(_getch());RET;if(c!='Y')exit(1);}}
  #define PRESSKEY    {char c; if(!NoQUERYS){ printf( "Press any key to continue." );c=_getch();RET; }}
  
  //above formatting of macros looks good
  
  //function
  int fwind2param(FILE* txt)
  {
    while( !feof(txt) ){       //looks good
      fgets( s, 255, txt );
    }
  }
  
  </code></pre>
  
  <p><strong>My clang-format file looks like this:</strong></p>
  
  <pre><code># Abgeänderte .clang-format-Datei
  # Anhaltspunkt ist https://clang.llvm.org/docs/ClangFormatStyleOptions.html
  # sowie: https://clangformat.com
  
  #for visual studio 2017 you have to comment this one thing:
  #BreakInheritanceList: AfterColon
  
  #version for visual studio 2019:
  #Language: Cpp
  BasedOnStyle: llvm
  
  AccessModifierOffset: 0
  AlignAfterOpenBracket: Align
  AlignConsecutiveAssignments: false
  AlignConsecutiveDeclarations: false
  AlignEscapedNewlinesLeft: true
  AlignOperands:   true
  AlignTrailingComments: false
  AllowAllParametersOfDeclarationOnNextLine: true
  AllowShortBlocksOnASingleLine: true
  AllowShortCaseLabelsOnASingleLine: true
  AllowShortIfStatementsOnASingleLine: true
  AllowShortFunctionsOnASingleLine: true
  AllowShortLoopsOnASingleLine: true
  AlwaysBreakAfterDefinitionReturnType: None
  AlwaysBreakAfterReturnType: None
  AlwaysBreakBeforeMultilineStrings: false
  AlwaysBreakTemplateDeclarations: false
  BinPackArguments: true
  BinPackParameters: true
  BraceWrapping:
    AfterClass:      true
    AfterControlStatement: false
    AfterEnum:       true
    AfterFunction:   true
    AfterObjCDeclaration: false
    AfterStruct:     true
    AfterUnion:      true
    BeforeCatch:     true
    BeforeElse:      false
    IndentBraces:    false
  BreakBeforeBinaryOperators: None
  BreakBeforeBraces: Custom
  BreakBeforeTernaryOperators: false
  BreakConstructorInitializers: AfterColon
  #BreakInheritanceList: AfterColon
  ColumnLimit:     300
  DerivePointerAlignment: false
  DisableFormat:   false
  SortIncludes: false
  IndentCaseLabels: true
  IndentWidth:     2
  KeepEmptyLinesAtTheStartOfBlocks: false
  MaxEmptyLinesToKeep: 2
  PointerAlignment: Right
  ReflowComments:  true
  SpaceAfterCStyleCast: false
  SpaceAfterTemplateKeyword: true
  SpaceBeforeAssignmentOperators: true
  SpaceBeforeParens: Never
  SpaceInEmptyParentheses: false
  SpacesBeforeTrailingComments: 4
  SpacesInAngles:  true
  SpacesInContainerLiterals: true
  SpacesInCStyleCastParentheses: false
  SpacesInParentheses: false
  SpacesInSquareBrackets: true
  TabWidth:        2
  UseTab:          Never
  </code></pre>
  
  <p>Update: This effect only happens when there is a multi-line macro.</p>