RatTac reopened this revision.
RatTac added a comment.
This revision is now accepted and ready to land.

This is a great feature. However I found two issues:

First issue is with combination of IndentPPDirectives

  // IndentPPDirectives: BeforeHash
  // IndentPragmas: true
  
  #if defined(WIN32)
        #define TEST // Correctly indented because IndentPPDirectives: 
BeforeHash
  #endif
  
  #if defined(WIN32)
  #pragma warning(disable : 4005) // NOT indented even though 
IndentPPDirectives: BeforeHash
  #endif

Second issue is with combination of lambda function:

  inline void ompExecuteParallel(unsigned int endIndex, const 
std::function<void(unsigned int i)>& computeFunction, unsigned int startIdx)
  {
        #pragma omp parallel for
        for(int i = (int)startIdx; i < (int)endIndex; i++)
                computeFunction(i);
  }
  
  int main()
  {
        #pragma omp parallel for
        for(int i = 0; i < 10; i++)
        {
                // Correctly indented because IndentPragmas: true
                #pragma openmp critical
                {
                        std::cout << i << endl;
                }
        }
  
        ompExecuteParallel(10, [&](unsigned int i) {
        #pragma openmp critical // Incorrectly indented even though 
IndentPragmas: true
                {
                        std::cout << i << endl;
                }
        });
  
        return 0;
  }

Hope this is the right place to raise concerns...

Regards
Tobias


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92753/new/

https://reviews.llvm.org/D92753

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D92753: [clang-form... Tobias Nöll via Phabricator via cfe-commits

Reply via email to