[clang] [clang-format]: Treat #pragma once as include guard for IndentPPDirectives (PR #135443)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 12 00:17:20 PDT 2025


owenca wrote:

Why would one want to use `pragma once` above a header guard? In fact, if I have the following,
```
#pragma once

#ifndef MY_MACRO
#define MY_MACRO
#endif

// ...
```
I don't want that to be treated like a header guard.

https://github.com/llvm/llvm-project/pull/135443


More information about the cfe-commits mailing list