================ @@ -0,0 +1,24 @@ +.. title:: clang-tidy - portability-avoid-pragma-once + +portability-avoid-pragma-once +============================= + +Finds uses of ``#pragma once`` and suggests replacing them with standard +include guards (``#ifndef``/``#define``/``#endif``) for improved portability. + +`#pragma once` is a non-standard extension, despite being widely supported +by modern compilers. Relying on it can lead to portability issues in +environments. + +Some older or specialized C/C++ compilers, particularly in embedded systems, +may not fully support #pragma once. ---------------- vbvictor wrote:
```suggestion may not fully support ``#pragma once``. ``` https://github.com/llvm/llvm-project/pull/140388 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits