summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Bateman <george.bateman16@gmail.com>2020-08-06 14:32:54 +0000
committerJulien Nabet <serval2412@yahoo.fr>2020-09-04 11:13:17 +0200
commit7021dae8115ceac19a2823e8d91e09d952d82c51 (patch)
tree9dc3097eb696368dd95edbcaae66f2aa6ba0f635
parent45c2e2edd5589ab355cfc2790a97b650b81861df (diff)
tdf#124176 Use #pragma once in compilerplugins
This commit was carried out by a Python script, source of which is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97. Change-Id: Id60579406a5aa16c3dc05a1bb5f1c1c828d39c50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100251 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--compilerplugins/clang/check.hxx5
-rw-r--r--compilerplugins/clang/compat.hxx5
-rw-r--r--compilerplugins/clang/functionaddress.hxx5
-rw-r--r--compilerplugins/clang/test/cppunitassertequals.hxx5
-rw-r--r--compilerplugins/clang/test/redundantcast.hxx5
-rw-r--r--compilerplugins/clang/test/redundantinline.hxx5
-rw-r--r--compilerplugins/clang/test/salunicodeliteral.hxx5
-rw-r--r--compilerplugins/clang/test/unnecessaryoverride-dtor.hxx5
-rw-r--r--compilerplugins/clang/test/unreffun.hxx5
9 files changed, 9 insertions, 36 deletions
diff --git a/compilerplugins/clang/check.hxx b/compilerplugins/clang/check.hxx
index f8793e14216c..03c5ab1eb1e4 100644
--- a/compilerplugins/clang/check.hxx
+++ b/compilerplugins/clang/check.hxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_COMPILERPLUGINS_CLANG_CHECK_HXX
-#define INCLUDED_COMPILERPLUGINS_CLANG_CHECK_HXX
+#pragma once
#include <cstddef>
@@ -307,6 +306,4 @@ bool isOkToRemoveArithmeticCast(
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx
index 51f13d39f332..bf3abf60c941 100644
--- a/compilerplugins/clang/compat.hxx
+++ b/compilerplugins/clang/compat.hxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_COMPILERPLUGINS_CLANG_COMPAT_HXX
-#define INCLUDED_COMPILERPLUGINS_CLANG_COMPAT_HXX
+#pragma once
#include <cstddef>
#include <utility>
@@ -310,6 +309,4 @@ inline bool isComparisonOp(clang::CXXOperatorCallExpr const * callExpr)
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/compilerplugins/clang/functionaddress.hxx b/compilerplugins/clang/functionaddress.hxx
index 266788a24119..d2bf19e14f65 100644
--- a/compilerplugins/clang/functionaddress.hxx
+++ b/compilerplugins/clang/functionaddress.hxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_COMPILERPLUGINS_CLANG_FUNCTIONADDRESS_HXX
-#define INCLUDED_COMPILERPLUGINS_CLANG_FUNCTIONADDRESS_HXX
+#pragma once
#include <clang/AST/RecursiveASTVisitor.h>
#include <unordered_set>
@@ -118,6 +117,4 @@ private:
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/compilerplugins/clang/test/cppunitassertequals.hxx b/compilerplugins/clang/test/cppunitassertequals.hxx
index 7a14886ad9eb..2448d64e93e7 100644
--- a/compilerplugins/clang/test/cppunitassertequals.hxx
+++ b/compilerplugins/clang/test/cppunitassertequals.hxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_COMPILERPLUGINS_CLANG_TEST_CPPUNITASSERTEQUALS_HXX
-#define INCLUDED_COMPILERPLUGINS_CLANG_TEST_CPPUNITASSERTEQUALS_HXX
+#pragma once
#include "sal/config.h"
@@ -21,6 +20,4 @@ struct T { bool operator ==(T); };
void test(
bool b1, bool b2, OUString const & s1, OUString const & s2, T t, void * p, std::nullptr_t n);
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/compilerplugins/clang/test/redundantcast.hxx b/compilerplugins/clang/test/redundantcast.hxx
index 014aecea4dc3..113dd0f1a8e8 100644
--- a/compilerplugins/clang/test/redundantcast.hxx
+++ b/compilerplugins/clang/test/redundantcast.hxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_COMPILERPLUGINS_CLANG_TEST_REDUNDANTCAST_HXX
-#define INCLUDED_COMPILERPLUGINS_CLANG_TEST_REDUNDANTCAST_HXX
+#pragma once
struct S {
void f1();
@@ -32,6 +31,4 @@ S const csr();
void testArithmeticTypedefs();
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/compilerplugins/clang/test/redundantinline.hxx b/compilerplugins/clang/test/redundantinline.hxx
index 8e87ae05fcf7..9b1460d587cc 100644
--- a/compilerplugins/clang/test/redundantinline.hxx
+++ b/compilerplugins/clang/test/redundantinline.hxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_COMPILERPLUGINS_CLANG_TEST_REDUNDANTINLINE_HXX
-#define INCLUDED_COMPILERPLUGINS_CLANG_TEST_REDUNDANTINLINE_HXX
+#pragma once
struct S1 {
inline S1();
@@ -76,6 +75,4 @@ constexpr inline int f6() { return 0; } // expected-error {{function definition
static inline int f7() { return 0; }
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/compilerplugins/clang/test/salunicodeliteral.hxx b/compilerplugins/clang/test/salunicodeliteral.hxx
index f4491c72397f..91bc224e7e1c 100644
--- a/compilerplugins/clang/test/salunicodeliteral.hxx
+++ b/compilerplugins/clang/test/salunicodeliteral.hxx
@@ -7,11 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_COMPILERPLUGINS_CLANG_TEST_SALUNICODELITERAL_HXX
-#define INCLUDED_COMPILERPLUGINS_CLANG_TEST_SALUNICODELITERAL_HXX
+#pragma once
void test();
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/compilerplugins/clang/test/unnecessaryoverride-dtor.hxx b/compilerplugins/clang/test/unnecessaryoverride-dtor.hxx
index e26024be1a28..9f722375a58b 100644
--- a/compilerplugins/clang/test/unnecessaryoverride-dtor.hxx
+++ b/compilerplugins/clang/test/unnecessaryoverride-dtor.hxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_COMPILERPLUGINS_CLANG_TEST_UNNECESSARYOVERRIDE_DTOR_HXX
-#define INCLUDED_COMPILERPLUGINS_CLANG_TEST_UNNECESSARYOVERRIDE_DTOR_HXX
+#pragma once
#include <sal/config.h>
@@ -50,6 +49,4 @@ template<typename T> struct TemplateBase: T {
virtual ~TemplateBase() {}
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/compilerplugins/clang/test/unreffun.hxx b/compilerplugins/clang/test/unreffun.hxx
index 1df26658429d..a209dd7b6437 100644
--- a/compilerplugins/clang/test/unreffun.hxx
+++ b/compilerplugins/clang/test/unreffun.hxx
@@ -7,13 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_COMPILERPLUGINS_CLANG_TEST_UNREFFUN_HXX
-#define INCLUDED_COMPILERPLUGINS_CLANG_TEST_UNREFFUN_HXX
+#pragma once
void f();
extern void i();
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */