Skip to content

Commit 1139768

Browse files
committed
ci: fix formatting, docs heading, and copyrights
Reflow a few source files to satisfy clang-format checks, fix the Constexpr heading level in docs/ispc.rst, and bump copyright years to the current year for touched files.
1 parent 1e1abc9 commit 1139768

23 files changed

Lines changed: 33 additions & 39 deletions

builtins/generic.ispc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2025, Intel Corporation
1+
// Copyright (c) 2026, Intel Corporation
22
//
33
// SPDX-License-Identifier: BSD-3-Clause
44

builtins/util.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;; Copyright (c) 2010-2025, Intel Corporation
1+
;; Copyright (c) 2010-2026, Intel Corporation
22
;;
33
;; SPDX-License-Identifier: BSD-3-Clause
44

docs/ispc.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3771,15 +3771,14 @@ them:
37713771
const varying int y = x * 2;
37723772

37733773
Constexpr
3774-
~~~~~~~~~
3774+
^^^^^^^^^
37753775

37763776
``constexpr`` declares variables and functions that can be evaluated at
37773777
compile time. ``constexpr`` values can be used in constant-expression
37783778
contexts such as array sizes, short vector lengths, ``switch`` case labels,
37793779
enumerator values, non-type template arguments, and default parameter values.
37803780

3781-
``constexpr`` variables
3782-
^^^^^^^^^^^^^^^^^^^^^^^
3781+
**Constexpr variables**
37833782

37843783
- ``constexpr`` implies ``const``.
37853784
- The initializer must be a constant expression.
@@ -3808,8 +3807,7 @@ Examples:
38083807
constexpr varying int lane = programIndex;
38093808
constexpr varying int off = lane * 4;
38103809

3811-
``constexpr`` functions
3812-
^^^^^^^^^^^^^^^^^^^^^^^
3810+
**Constexpr functions**
38133811

38143812
``constexpr`` functions can be evaluated at compile time when called in a
38153813
constant-expression context. The function is still generated as normal code
@@ -3840,8 +3838,7 @@ Example:
38403838

38413839
uniform int buf[gcd(48, 18)];
38423840

3843-
Forward references
3844-
^^^^^^^^^^^^^^^^^^
3841+
**Forward references**
38453842

38463843
Global initializers and default parameter values may call ``constexpr``
38473844
functions defined later in the same file. Other constant-expression contexts

src/ast.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2011-2025, Intel Corporation
2+
Copyright (c) 2011-2026, Intel Corporation
33
44
SPDX-License-Identifier: BSD-3-Clause
55
*/

src/constexpr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2025, Intel Corporation
2+
Copyright (c) 2026, Intel Corporation
33
44
SPDX-License-Identifier: BSD-3-Clause
55
*/

src/constexpr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2025, Intel Corporation
2+
Copyright (c) 2026, Intel Corporation
33
44
SPDX-License-Identifier: BSD-3-Clause
55
*/

src/decl.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2010-2025, Intel Corporation
2+
Copyright (c) 2010-2026, Intel Corporation
33
44
SPDX-License-Identifier: BSD-3-Clause
55
*/
@@ -1183,8 +1183,7 @@ std::vector<VariableDeclaration> Declaration::GetVariableDeclarations() const {
11831183

11841184
Symbol *sym =
11851185
new Symbol(decl->name, decl->pos, Symbol::SymbolKind::Variable, decl->type, decl->storageClass, AL);
1186-
sym->isConstexpr =
1187-
((declSpecs->typeQualifiers | decl->typeQualifiers) & TYPEQUAL_CONSTEXPR) != 0;
1186+
sym->isConstexpr = ((declSpecs->typeQualifiers | decl->typeQualifiers) & TYPEQUAL_CONSTEXPR) != 0;
11881187
m->symbolTable->AddVariable(sym);
11891188
vars.push_back(VariableDeclaration(sym, decl->initExpr));
11901189
} else {

src/decl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2010-2025, Intel Corporation
2+
Copyright (c) 2010-2026, Intel Corporation
33
44
SPDX-License-Identifier: BSD-3-Clause
55
*/

src/expr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2010-2025, Intel Corporation
2+
Copyright (c) 2010-2026, Intel Corporation
33
44
SPDX-License-Identifier: BSD-3-Clause
55
*/
@@ -38,7 +38,6 @@
3838
#include <utility>
3939

4040
#include <llvm/ExecutionEngine/GenericValue.h>
41-
#include <llvm/Support/raw_ostream.h>
4241
#include <llvm/IR/CallingConv.h>
4342
#include <llvm/IR/DerivedTypes.h>
4443
#include <llvm/IR/Function.h>
@@ -47,6 +46,7 @@
4746
#include <llvm/IR/LLVMContext.h>
4847
#include <llvm/IR/Module.h>
4948
#include <llvm/IR/Type.h>
49+
#include <llvm/Support/raw_ostream.h>
5050

5151
using namespace ispc;
5252

src/expr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2010-2025, Intel Corporation
2+
Copyright (c) 2010-2026, Intel Corporation
33
44
SPDX-License-Identifier: BSD-3-Clause
55
*/

0 commit comments

Comments
 (0)