[clang-format] Issue with SpacesInParentheses with global namespace variables.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[clang-format] Issue with SpacesInParentheses with global namespace variables.

Louis Dionne via cfe-dev
Hi,

When SpacesInParentheses is set to true clang-format does not add a space before a global namespace variable. For example, this is the output of clang-format for a contrived exampled.

#include <iostream>


void print_val( std::ostream &s ) { s << "Hello world" << std::endl; }


int main( void ) {

  print_val(::std::cout );

  return 0;

}


The .clang-format looked like

Language:        Cpp

SpacesInParentheses: true


I have have a potential fix here https://reviews.llvm.org/D43957. It works locally and passes the unit tests, but as this is my first time working with this code base I am unsure of the procedure to follow for proposing changes.


Regards,

-Darby


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev