Skip to content

Disable whitespace/braces for blocks after multi-line OpenMP directives #294

Open

Description

@jeissonh

For OpenMP one-line directives before code blocks, cpplint works great, e.g.:

#pragma omp parallel num_threads(thread_count)
{
  // Concurrent instructions here
}

But if your pragma exceeds 80 chars and you slice it escaping the new line, e.g.:

#pragma omp parallel num_threads(thread_count) \
    default(none) shared(std::cout, thread_count)
{
  // Concurrent instructions here
}

you will get a cpplint diagnostic:

your.cpp:3:  { should almost always be at the end of the previous line  [whitespace/braces]

It would be fantastic if you add support for multi-line pragma directives.
Thank you very much in advance!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions