5

I would like to use clan-tidy. The program should check if I do have header guards, which is why I set the flag llvm-header-guard. Unfortunately this checks if the header guards are llvm-style, which I don't want. I want to use #pragma once.

Does anyone have an idea how to tell clang-tidy to check for #pragma once instead of llvm-style header guards?

User12547645
  • 6,955
  • 3
  • 38
  • 69

1 Answers1

3

There is no such check in clang-tidy.

#pragma once is not part of the C++ standard (for good reasons) and until it becomes a part of the standard there is no reason to add it to clang-tidy.

You can write your own check but I don't think it's worth the effort.

pablo285
  • 2,460
  • 4
  • 14
  • 38