The commit improves the AST print output of function attributes. In the previous version, all attributes were output after the function declaration. This is correct for most attributes but e.g. not for [[noreturn]]. Now it is decided for each attribues if it should be output before or after function declaration. It follows the following rule:
- All [[...]] attributes are placed before declaration
- __declspec attributes are placed before declaration as requested by Microsoft ... https://learn.microsoft.com/en-us/cpp/cpp/declspec?view=msvc-170
- Some keyword are placed after the declaration
- Without a function body attributes are placed after declaration
- With a function body attributes are placed before declaration because GCC produces are error and Clang a warning otherwise
You can use A->isStandardAttributeSyntax()