Skip to content

Commit 352d347

Browse files
AlexisPerrysscalpone
authored andcommitted
[flang] Changed *.cc file extension to *.cpp (updated scripts) (flang-compiler/f18#958)
Updated CMake files accordingly, using better regex Updated license headers to match new extension and fit within 80 columns Updated other comments within files that referred to the old extension Original-commit: flang-compiler/f18@ae7721e Reviewed-on: flang-compiler/f18#958
1 parent 65b62f9 commit 352d347

File tree

137 files changed

+247
-247
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+247
-247
lines changed

flang/documentation/C++style.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ unless they introduce ambiguity.
3636

3737
### Files
3838
1. File names should use dashes, not underscores. C++ sources have the
39-
extension ".cc", not ".C" or ".cpp" or ".cxx". Don't create needless
39+
extension ".cpp", not ".C" or ".cc" or ".cxx". Don't create needless
4040
source directory hierarchies.
4141
1. Header files should be idempotent. Use the usual technique:
4242
```
@@ -46,11 +46,11 @@ source directory hierarchies.
4646
#endif // FORTRAN_header_H_
4747
```
4848
1. `#include` every header defining an entity that your project header or source
49-
file actually uses directly. (Exception: when foo.cc starts, as it should,
49+
file actually uses directly. (Exception: when foo.cpp starts, as it should,
5050
with `#include "foo.h"`, and foo.h includes bar.h in order to define the
5151
interface to the module foo, you don't have to redundantly `#include "bar.h"`
52-
in foo.cc.)
53-
1. In the source file "foo.cc", put its corresponding `#include "foo.h"`
52+
in foo.cpp.)
53+
1. In the source file "foo.cpp", put its corresponding `#include "foo.h"`
5454
first in the sequence of inclusions.
5555
Then `#include` other project headers in alphabetic order; then C++ standard
5656
headers, also alphabetically; then C and system headers.

flang/documentation/PullRequestChecklist.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ can also be used when reviewing pull requests.
2929
## Follow the style guide
3030
The following items are taken from the [C++ style guide](C++style.md). But
3131
even though I've read the style guide, they regularly trip me up.
32-
* Run clang-format version 7 on all .cc and .h files.
32+
* Run clang-format version 7 on all .cpp and .h files.
3333
* Make sure that all source lines have 80 or fewer characters. Note that
3434
clang-format will do this for most code. But you may need to break up long
3535
strings.

flang/include/flang/evaluate/traverse.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// - overrides for "Result operator()"
2626
//
2727
// Boilerplate classes also appear below to ease construction of visitors.
28-
// See CheckSpecificationExpr() in check-expression.cc for an example client.
28+
// See CheckSpecificationExpr() in check-expression.cpp for an example client.
2929
//
3030
// How this works:
3131
// - The operator() overloads in Traverse<> invoke the visitor's Default() for

flang/lib/common/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
#===------------------------------------------------------------------------===#
88

99
add_library(FortranCommon
10-
Fortran.cc
11-
Fortran-features.cc
12-
default-kinds.cc
13-
idioms.cc
10+
Fortran.cpp
11+
Fortran-features.cpp
12+
default-kinds.cpp
13+
idioms.cpp
1414
)
1515

1616
install (TARGETS FortranCommon

flang/lib/common/Fortran-features.cc flang/lib/common/Fortran-features.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/common/Fortran-features.cc ------------------------------------===//
1+
//===-- lib/common/Fortran-features.cpp -----------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/common/Fortran.cc flang/lib/common/Fortran.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/common/Fortran.cc ---------------------------------------------===//
1+
//===-- lib/common/Fortran.cpp --------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/common/default-kinds.cc flang/lib/common/default-kinds.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/common/default-kinds.cc ---------------------------------------===//
1+
//===-- lib/common/default-kinds.cpp --------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/common/idioms.cc flang/lib/common/idioms.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/common/idioms.cc ----------------------------------------------===//
1+
//===-- lib/common/idioms.cpp ---------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/decimal/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#===------------------------------------------------------------------------===#
88

99
add_library(FortranDecimal
10-
binary-to-decimal.cc
11-
decimal-to-binary.cc
10+
binary-to-decimal.cpp
11+
decimal-to-binary.cpp
1212
)
1313

1414
install (TARGETS FortranDecimal

flang/lib/decimal/binary-to-decimal.cc flang/lib/decimal/binary-to-decimal.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/decimal/binary-to-decimal.cc ----------------------------------===//
1+
//===-- lib/decimal/binary-to-decimal.cpp ---------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/decimal/decimal-to-binary.cc flang/lib/decimal/decimal-to-binary.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/decimal/decimal-to-binary.cc ----------------------------------===//
1+
//===-- lib/decimal/decimal-to-binary.cpp ---------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/CMakeLists.txt

+25-25
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@
77
#===------------------------------------------------------------------------===#
88

99
add_library(FortranEvaluate
10-
call.cc
11-
characteristics.cc
12-
check-expression.cc
13-
common.cc
14-
complex.cc
15-
constant.cc
16-
expression.cc
17-
fold.cc
18-
fold-character.cc
19-
fold-complex.cc
20-
fold-integer.cc
21-
fold-logical.cc
22-
fold-real.cc
23-
formatting.cc
24-
host.cc
25-
integer.cc
26-
intrinsics.cc
27-
intrinsics-library.cc
28-
logical.cc
29-
real.cc
30-
shape.cc
31-
static-data.cc
32-
tools.cc
33-
type.cc
34-
variable.cc
10+
call.cpp
11+
characteristics.cpp
12+
check-expression.cpp
13+
common.cpp
14+
complex.cpp
15+
constant.cpp
16+
expression.cpp
17+
fold.cpp
18+
fold-character.cpp
19+
fold-complex.cpp
20+
fold-integer.cpp
21+
fold-logical.cpp
22+
fold-real.cpp
23+
formatting.cpp
24+
host.cpp
25+
integer.cpp
26+
intrinsics.cpp
27+
intrinsics-library.cpp
28+
logical.cpp
29+
real.cpp
30+
shape.cpp
31+
static-data.cpp
32+
tools.cpp
33+
type.cpp
34+
variable.cpp
3535
)
3636

3737
target_link_libraries(FortranEvaluate

flang/lib/evaluate/call.cc flang/lib/evaluate/call.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/call.cc ----------------------------------------------===//
1+
//===-- lib/evaluate/call.cpp ---------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/characteristics.cc flang/lib/evaluate/characteristics.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/characteristics.cc -----------------------------------===//
1+
//===-- lib/evaluate/characteristics.cpp ----------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/check-expression.cc flang/lib/evaluate/check-expression.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/check-expression.cc ----------------------------------===//
1+
//===-- lib/evaluate/check-expression.cpp ---------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/common.cc flang/lib/evaluate/common.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/common.cc --------------------------------------------===//
1+
//===-- lib/evaluate/common.cpp -------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/complex.cc flang/lib/evaluate/complex.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/complex.cc -------------------------------------------===//
1+
//===-- lib/evaluate/complex.cpp ------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/constant.cc flang/lib/evaluate/constant.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/constant.cc ------------------------------------------===//
1+
//===-- lib/evaluate/constant.cpp -----------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/expression.cc flang/lib/evaluate/expression.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/expression.cc ----------------------------------------===//
1+
//===-- lib/evaluate/expression.cpp ---------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/fold-character.cc flang/lib/evaluate/fold-character.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/fold-character.cc ------------------------------------===//
1+
//===-- lib/evaluate/fold-character.cpp -----------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/fold-complex.cc flang/lib/evaluate/fold-complex.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/fold-complex.cc --------------------------------------===//
1+
//===-- lib/evaluate/fold-complex.cpp -------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/fold-integer.cc flang/lib/evaluate/fold-integer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/fold-integer.cc --------------------------------------===//
1+
//===-- lib/evaluate/fold-integer.cpp -------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/fold-logical.cc flang/lib/evaluate/fold-logical.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/fold-logical.cc --------------------------------------===//
1+
//===-- lib/evaluate/fold-logical.cpp -------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/fold-real.cc flang/lib/evaluate/fold-real.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/fold-real.cc -----------------------------------------===//
1+
//===-- lib/evaluate/fold-real.cpp ----------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/fold.cc flang/lib/evaluate/fold.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/fold.cc ----------------------------------------------===//
1+
//===-- lib/evaluate/fold.cpp ---------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/formatting.cc flang/lib/evaluate/formatting.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/formatting.cc ----------------------------------------===//
1+
//===-- lib/evaluate/formatting.cpp ---------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/host.cc flang/lib/evaluate/host.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/host.cc ----------------------------------------------===//
1+
//===-- lib/evaluate/host.cpp ---------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/integer.cc flang/lib/evaluate/integer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/integer.cc -------------------------------------------===//
1+
//===-- lib/evaluate/integer.cpp ------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/intrinsics-library-templates.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// function of the structures defined in intrinsics-library.h. It should only be
1414
// included if these member functions are used, else intrinsics-library.h is
1515
// sufficient. This is to avoid circular dependencies. The below implementation
16-
// cannot be defined in .cc file because it would be too cumbersome to decide
16+
// cannot be defined in .cpp file because it would be too cumbersome to decide
1717
// which version should be instantiated in a generic way.
1818

1919
#include "host.h"

flang/lib/evaluate/intrinsics-library.cc flang/lib/evaluate/intrinsics-library.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/intrinsics-library.cc --------------------------------===//
1+
//===-- lib/evaluate/intrinsics-library.cpp -------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/intrinsics.cc flang/lib/evaluate/intrinsics.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/intrinsics.cc ----------------------------------------===//
1+
//===-- lib/evaluate/intrinsics.cpp ---------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/logical.cc flang/lib/evaluate/logical.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/logical.cc -------------------------------------------===//
1+
//===-- lib/evaluate/logical.cpp ------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/real.cc flang/lib/evaluate/real.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/real.cc ----------------------------------------------===//
1+
//===-- lib/evaluate/real.cpp ---------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/shape.cc flang/lib/evaluate/shape.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/shape.cc ---------------------------------------------===//
1+
//===-- lib/evaluate/shape.cpp --------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/static-data.cc flang/lib/evaluate/static-data.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/static-data.cc ---------------------------------------===//
1+
//===-- lib/evaluate/static-data.cpp --------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/tools.cc flang/lib/evaluate/tools.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/tools.cc ---------------------------------------------===//
1+
//===-- lib/evaluate/tools.cpp --------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/type.cc flang/lib/evaluate/type.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/type.cc ----------------------------------------------===//
1+
//===-- lib/evaluate/type.cpp ---------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/evaluate/variable.cc flang/lib/evaluate/variable.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/evaluate/variable.cc ------------------------------------------===//
1+
//===-- lib/evaluate/variable.cpp -----------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

flang/lib/parser/CMakeLists.txt

+23-23
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,29 @@
77
#===------------------------------------------------------------------------===#
88

99
add_library(FortranParser
10-
Fortran-parsers.cc
11-
char-buffer.cc
12-
char-block.cc
13-
char-set.cc
14-
characters.cc
15-
debug-parser.cc
16-
executable-parsers.cc
17-
expr-parsers.cc
18-
instrumented-parser.cc
19-
io-parsers.cc
20-
message.cc
21-
openmp-parsers.cc
22-
parse-tree.cc
23-
parsing.cc
24-
preprocessor.cc
25-
prescan.cc
26-
program-parsers.cc
27-
provenance.cc
28-
source.cc
29-
token-sequence.cc
30-
tools.cc
31-
unparse.cc
32-
user-state.cc
10+
Fortran-parsers.cpp
11+
char-buffer.cpp
12+
char-block.cpp
13+
char-set.cpp
14+
characters.cpp
15+
debug-parser.cpp
16+
executable-parsers.cpp
17+
expr-parsers.cpp
18+
instrumented-parser.cpp
19+
io-parsers.cpp
20+
message.cpp
21+
openmp-parsers.cpp
22+
parse-tree.cpp
23+
parsing.cpp
24+
preprocessor.cpp
25+
prescan.cpp
26+
program-parsers.cpp
27+
provenance.cpp
28+
source.cpp
29+
token-sequence.cpp
30+
tools.cpp
31+
unparse.cpp
32+
user-state.cpp
3333
)
3434

3535
target_link_libraries(FortranParser

flang/lib/parser/Fortran-parsers.cc flang/lib/parser/Fortran-parsers.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- lib/parser/Fortran-parsers.cc -------------------------------------===//
1+
//===-- lib/parser/Fortran-parsers.cpp ------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -24,11 +24,11 @@
2424
// various per-type parsers are partitioned into several C++ source
2525
// files. This file contains parsers for constants, types, declarations,
2626
// and misfits (mostly clauses 7, 8, & 9 of Fortran 2018). The others:
27-
// executable-parsers.cc Executable statements
28-
// expr-parsers.cc Expressions
29-
// io-parsers.cc I/O statements and FORMAT
30-
// openmp-parsers.cc OpenMP directives
31-
// program-parsers.cc Program units
27+
// executable-parsers.cpp Executable statements
28+
// expr-parsers.cpp Expressions
29+
// io-parsers.cpp I/O statements and FORMAT
30+
// openmp-parsers.cpp OpenMP directives
31+
// program-parsers.cpp Program units
3232

3333
#include "basic-parsers.h"
3434
#include "expr-parsers.h"

0 commit comments

Comments
 (0)