[PATCH] D61989: [clang-tidy] enable modernize-concat-nested-namespaces on header files
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 18 06:19:43 PDT 2019
aaron.ballman added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/modernize-concat-nested-namespaces.h:1
+#pragma once
+
----------------
shixiao wrote:
> alexfh wrote:
> > alexfh wrote:
> > > Please put the header under Inputs/<check-name>/ directory to keep the tests directory a bit tidier. The header can then be renamed to something shorter, btw.
> > Is it important to use `#pragma once` in this file? Can we use regular include guards instead?
> It's not--I added it out of habit. Any particular reason to use regular include guards vs. `#pragma once`?
>
> re: mv headers--sure, will do.
Regular include guards work reliably and portably. `#pragma once` is neither portable, nor works in correctly all circumstances even when it is supported (think about atrocities like including the same file over more than one network mount point).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61989/new/
https://reviews.llvm.org/D61989
More information about the cfe-commits
mailing list