### Files
1. File names should use dashes, not underscores. C++ sources have the
-extension ".cc", not ".C" or ".cpp" or ".cxx". Don't create needless
+extension ".cpp", not ".C" or ".cc" or ".cxx". Don't create needless
source directory hierarchies.
1. Header files should be idempotent. Use the usual technique:
```
#endif // FORTRAN_header_H_
```
1. `#include` every header defining an entity that your project header or source
-file actually uses directly. (Exception: when foo.cc starts, as it should,
+file actually uses directly. (Exception: when foo.cpp starts, as it should,
with `#include "foo.h"`, and foo.h includes bar.h in order to define the
interface to the module foo, you don't have to redundantly `#include "bar.h"`
-in foo.cc.)
-1. In the source file "foo.cc", put its corresponding `#include "foo.h"`
+in foo.cpp.)
+1. In the source file "foo.cpp", put its corresponding `#include "foo.h"`
first in the sequence of inclusions.
Then `#include` other project headers in alphabetic order; then C++ standard
headers, also alphabetically; then C and system headers.
## Follow the style guide
The following items are taken from the [C++ style guide](C++style.md). But
even though I've read the style guide, they regularly trip me up.
-* Run clang-format version 7 on all .cc and .h files.
+* Run clang-format version 7 on all .cpp and .h files.
* Make sure that all source lines have 80 or fewer characters. Note that
clang-format will do this for most code. But you may need to break up long
strings.
// - overrides for "Result operator()"
//
// Boilerplate classes also appear below to ease construction of visitors.
-// See CheckSpecificationExpr() in check-expression.cc for an example client.
+// See CheckSpecificationExpr() in check-expression.cpp for an example client.
//
// How this works:
// - The operator() overloads in Traverse<> invoke the visitor's Default() for
#===------------------------------------------------------------------------===#
add_library(FortranCommon
- Fortran.cc
- Fortran-features.cc
- default-kinds.cc
- idioms.cc
+ Fortran.cpp
+ Fortran-features.cpp
+ default-kinds.cpp
+ idioms.cpp
)
install (TARGETS FortranCommon
-//===-- lib/common/Fortran-features.cc ------------------------------------===//
+//===-- lib/common/Fortran-features.cpp -----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/common/Fortran.cc ---------------------------------------------===//
+//===-- lib/common/Fortran.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/common/default-kinds.cc ---------------------------------------===//
+//===-- lib/common/default-kinds.cpp --------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/common/idioms.cc ----------------------------------------------===//
+//===-- lib/common/idioms.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
#===------------------------------------------------------------------------===#
add_library(FortranDecimal
- binary-to-decimal.cc
- decimal-to-binary.cc
+ binary-to-decimal.cpp
+ decimal-to-binary.cpp
)
install (TARGETS FortranDecimal
-//===-- lib/decimal/binary-to-decimal.cc ----------------------------------===//
+//===-- lib/decimal/binary-to-decimal.cpp ---------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/decimal/decimal-to-binary.cc ----------------------------------===//
+//===-- lib/decimal/decimal-to-binary.cpp ---------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
#===------------------------------------------------------------------------===#
add_library(FortranEvaluate
- call.cc
- characteristics.cc
- check-expression.cc
- common.cc
- complex.cc
- constant.cc
- expression.cc
- fold.cc
- fold-character.cc
- fold-complex.cc
- fold-integer.cc
- fold-logical.cc
- fold-real.cc
- formatting.cc
- host.cc
- integer.cc
- intrinsics.cc
- intrinsics-library.cc
- logical.cc
- real.cc
- shape.cc
- static-data.cc
- tools.cc
- type.cc
- variable.cc
+ call.cpp
+ characteristics.cpp
+ check-expression.cpp
+ common.cpp
+ complex.cpp
+ constant.cpp
+ expression.cpp
+ fold.cpp
+ fold-character.cpp
+ fold-complex.cpp
+ fold-integer.cpp
+ fold-logical.cpp
+ fold-real.cpp
+ formatting.cpp
+ host.cpp
+ integer.cpp
+ intrinsics.cpp
+ intrinsics-library.cpp
+ logical.cpp
+ real.cpp
+ shape.cpp
+ static-data.cpp
+ tools.cpp
+ type.cpp
+ variable.cpp
)
target_link_libraries(FortranEvaluate
-//===-- lib/evaluate/call.cc ----------------------------------------------===//
+//===-- lib/evaluate/call.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/characteristics.cc -----------------------------------===//
+//===-- lib/evaluate/characteristics.cpp ----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/check-expression.cc ----------------------------------===//
+//===-- lib/evaluate/check-expression.cpp ---------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/common.cc --------------------------------------------===//
+//===-- lib/evaluate/common.cpp -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/complex.cc -------------------------------------------===//
+//===-- lib/evaluate/complex.cpp ------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/constant.cc ------------------------------------------===//
+//===-- lib/evaluate/constant.cpp -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/expression.cc ----------------------------------------===//
+//===-- lib/evaluate/expression.cpp ---------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/fold-character.cc ------------------------------------===//
+//===-- lib/evaluate/fold-character.cpp -----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/fold-complex.cc --------------------------------------===//
+//===-- lib/evaluate/fold-complex.cpp -------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/fold-integer.cc --------------------------------------===//
+//===-- lib/evaluate/fold-integer.cpp -------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/fold-logical.cc --------------------------------------===//
+//===-- lib/evaluate/fold-logical.cpp -------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/fold-real.cc -----------------------------------------===//
+//===-- lib/evaluate/fold-real.cpp ----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/fold.cc ----------------------------------------------===//
+//===-- lib/evaluate/fold.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/formatting.cc ----------------------------------------===//
+//===-- lib/evaluate/formatting.cpp ---------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/host.cc ----------------------------------------------===//
+//===-- lib/evaluate/host.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/integer.cc -------------------------------------------===//
+//===-- lib/evaluate/integer.cpp ------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// function of the structures defined in intrinsics-library.h. It should only be
// included if these member functions are used, else intrinsics-library.h is
// sufficient. This is to avoid circular dependencies. The below implementation
-// cannot be defined in .cc file because it would be too cumbersome to decide
+// cannot be defined in .cpp file because it would be too cumbersome to decide
// which version should be instantiated in a generic way.
#include "host.h"
-//===-- lib/evaluate/intrinsics-library.cc --------------------------------===//
+//===-- lib/evaluate/intrinsics-library.cpp -------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/intrinsics.cc ----------------------------------------===//
+//===-- lib/evaluate/intrinsics.cpp ---------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/logical.cc -------------------------------------------===//
+//===-- lib/evaluate/logical.cpp ------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/real.cc ----------------------------------------------===//
+//===-- lib/evaluate/real.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/shape.cc ---------------------------------------------===//
+//===-- lib/evaluate/shape.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/static-data.cc ---------------------------------------===//
+//===-- lib/evaluate/static-data.cpp --------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/tools.cc ---------------------------------------------===//
+//===-- lib/evaluate/tools.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/type.cc ----------------------------------------------===//
+//===-- lib/evaluate/type.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/evaluate/variable.cc ------------------------------------------===//
+//===-- lib/evaluate/variable.cpp -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
#===------------------------------------------------------------------------===#
add_library(FortranParser
- Fortran-parsers.cc
- char-buffer.cc
- char-block.cc
- char-set.cc
- characters.cc
- debug-parser.cc
- executable-parsers.cc
- expr-parsers.cc
- instrumented-parser.cc
- io-parsers.cc
- message.cc
- openmp-parsers.cc
- parse-tree.cc
- parsing.cc
- preprocessor.cc
- prescan.cc
- program-parsers.cc
- provenance.cc
- source.cc
- token-sequence.cc
- tools.cc
- unparse.cc
- user-state.cc
+ Fortran-parsers.cpp
+ char-buffer.cpp
+ char-block.cpp
+ char-set.cpp
+ characters.cpp
+ debug-parser.cpp
+ executable-parsers.cpp
+ expr-parsers.cpp
+ instrumented-parser.cpp
+ io-parsers.cpp
+ message.cpp
+ openmp-parsers.cpp
+ parse-tree.cpp
+ parsing.cpp
+ preprocessor.cpp
+ prescan.cpp
+ program-parsers.cpp
+ provenance.cpp
+ source.cpp
+ token-sequence.cpp
+ tools.cpp
+ unparse.cpp
+ user-state.cpp
)
target_link_libraries(FortranParser
-//===-- lib/parser/Fortran-parsers.cc -------------------------------------===//
+//===-- lib/parser/Fortran-parsers.cpp ------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// various per-type parsers are partitioned into several C++ source
// files. This file contains parsers for constants, types, declarations,
// and misfits (mostly clauses 7, 8, & 9 of Fortran 2018). The others:
-// executable-parsers.cc Executable statements
-// expr-parsers.cc Expressions
-// io-parsers.cc I/O statements and FORMAT
-// openmp-parsers.cc OpenMP directives
-// program-parsers.cc Program units
+// executable-parsers.cpp Executable statements
+// expr-parsers.cpp Expressions
+// io-parsers.cpp I/O statements and FORMAT
+// openmp-parsers.cpp OpenMP directives
+// program-parsers.cpp Program units
#include "basic-parsers.h"
#include "expr-parsers.h"
-//===-- lib/parser/char-block.cc --------------------------------*- C++ -*-===//
+//===-- lib/parser/char-block.cpp -------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/char-buffer.cc -----------------------------------------===//
+//===-- lib/parser/char-buffer.cpp ----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/char-set.cc --------------------------------------------===//
+//===-- lib/parser/char-set.cpp -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/characters.cc ------------------------------------------===//
+//===-- lib/parser/characters.cpp -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/debug-parser.cc ----------------------------------------===//
+//===-- lib/parser/debug-parser.cpp ---------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/executable-parsers.cc ----------------------------------===//
+//===-- lib/parser/executable-parsers.cpp ---------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/expr-parsers.cc ----------------------------------------===//
+//===-- lib/parser/expr-parsers.cpp ---------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/instrumented-parser.cc ---------------------------------===//
+//===-- lib/parser/instrumented-parser.cpp --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/io-parsers.cc ------------------------------------------===//
+//===-- lib/parser/io-parsers.cpp -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/message.cc ---------------------------------------------===//
+//===-- lib/parser/message.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/openmp-parsers.cc --------------------------------------===//
+//===-- lib/parser/openmp-parsers.cpp -------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/parse-tree.cc ------------------------------------------===//
+//===-- lib/parser/parse-tree.cpp -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/parsing.cc ---------------------------------------------===//
+//===-- lib/parser/parsing.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/preprocessor.cc ----------------------------------------===//
+//===-- lib/parser/preprocessor.cpp ---------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/prescan.cc ---------------------------------------------===//
+//===-- lib/parser/prescan.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/program-parsers.cc -------------------------------------===//
+//===-- lib/parser/program-parsers.cpp ------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/provenance.cc ------------------------------------------===//
+//===-- lib/parser/provenance.cpp -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/source.cc ----------------------------------------------===//
+//===-- lib/parser/source.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/token-sequence.cc --------------------------------------===//
+//===-- lib/parser/token-sequence.cpp -------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/tools.cc -----------------------------------------------===//
+//===-- lib/parser/tools.cpp ----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/unparse.cc ---------------------------------------------===//
+//===-- lib/parser/unparse.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/parser/user-state.cc ------------------------------------------===//
+//===-- lib/parser/user-state.cpp -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
#===------------------------------------------------------------------------===#
add_library(FortranSemantics
- assignment.cc
- attr.cc
- canonicalize-do.cc
- canonicalize-omp.cc
- check-allocate.cc
- check-arithmeticif.cc
- check-call.cc
- check-coarray.cc
- check-deallocate.cc
- check-declarations.cc
- check-do.cc
- check-if-stmt.cc
- check-io.cc
- check-nullify.cc
- check-omp-structure.cc
- check-purity.cc
- check-return.cc
- check-stop.cc
- expression.cc
- mod-file.cc
- pointer-assignment.cc
- program-tree.cc
- resolve-labels.cc
- resolve-names.cc
- resolve-names-utils.cc
- rewrite-parse-tree.cc
- scope.cc
- semantics.cc
- symbol.cc
- tools.cc
- type.cc
- unparse-with-symbols.cc
+ assignment.cpp
+ attr.cpp
+ canonicalize-do.cpp
+ canonicalize-omp.cpp
+ check-allocate.cpp
+ check-arithmeticif.cpp
+ check-call.cpp
+ check-coarray.cpp
+ check-deallocate.cpp
+ check-declarations.cpp
+ check-do.cpp
+ check-if-stmt.cpp
+ check-io.cpp
+ check-nullify.cpp
+ check-omp-structure.cpp
+ check-purity.cpp
+ check-return.cpp
+ check-stop.cpp
+ expression.cpp
+ mod-file.cpp
+ pointer-assignment.cpp
+ program-tree.cpp
+ resolve-labels.cpp
+ resolve-names.cpp
+ resolve-names-utils.cpp
+ rewrite-parse-tree.cpp
+ scope.cpp
+ semantics.cpp
+ symbol.cpp
+ tools.cpp
+ type.cpp
+ unparse-with-symbols.cpp
)
target_link_libraries(FortranSemantics
-//===-- lib/semantics/assignment.cc ---------------------------------------===//
+//===-- lib/semantics/assignment.cpp --------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
};
void AssignmentContext::Analyze(const parser::AssignmentStmt &stmt) {
- // Assignment statement analysis is in expression.cc where user-defined
+ // Assignment statement analysis is in expression.cpp where user-defined
// assignments can be recognized and replaced.
if (const evaluate::Assignment * asst{GetAssignment(stmt)}) {
if (const auto *intrinsicAsst{
-//===-- lib/semantics/attr.cc ---------------------------------------------===//
+//===-- lib/semantics/attr.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/canonicalize-do.cc ----------------------------------===//
+//===-- lib/semantics/canonicalize-do.cpp ---------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/canonicalize-omp.cc ---------------------------------===//
+//===-- lib/semantics/canonicalize-omp.cpp --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-allocate.cc -----------------------------------===//
+//===-- lib/semantics/check-allocate.cpp ----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-arithmeticif.cc -------------------------------===//
+//===-- lib/semantics/check-arithmeticif.cpp ------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-call.cc ---------------------------------------===//
+//===-- lib/semantics/check-call.cpp --------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-coarray.cc ------------------------------------===//
+//===-- lib/semantics/check-coarray.cpp -----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-deallocate.cc ---------------------------------===//
+//===-- lib/semantics/check-deallocate.cpp --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-declarations.cc -------------------------------===//
+//===-- lib/semantics/check-declarations.cpp ------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
}
}
}
- // TODO: Move C8106 (&al.) checks here from resolve-names-utils.cc
+ // TODO: Move C8106 (&al.) checks here from resolve-names-utils.cpp
}
void CheckHelper::CheckBlockData(const Scope &scope) {
-//===-- lib/semantics/check-do.cc -----------------------------------------===//
+//===-- lib/semantics/check-do.cpp ----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-if-stmt.cc ------------------------------------===//
+//===-- lib/semantics/check-if-stmt.cpp -----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-io.cc -----------------------------------------===//
+//===-- lib/semantics/check-io.cpp ----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-nullify.cc ------------------------------------===//
+//===-- lib/semantics/check-nullify.cpp -----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-omp-structure.cc ------------------------------===//
+//===-- lib/semantics/check-omp-structure.cpp -----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-purity.cc -------------------------------------===//
+//===-- lib/semantics/check-purity.cpp ------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-return.cc -------------------------------------===//
+//===-- lib/semantics/check-return.cpp ------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/check-stop.cc ---------------------------------------===//
+//===-- lib/semantics/check-stop.cpp --------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/expression.cc ---------------------------------------===//
+//===-- lib/semantics/expression.cpp --------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/mod-file.cc -----------------------------------------===//
+//===-- lib/semantics/mod-file.cpp ----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/pointer-assignment.cc -------------------------------===//
+//===-- lib/semantics/pointer-assignment.cpp ------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/program-tree.cc -------------------------------------===//
+//===-- lib/semantics/program-tree.cpp ------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/resolve-labels.cc -----------------------------------===//
+//===-- lib/semantics/resolve-labels.cpp ----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/resolve-names-utils.cc ------------------------------===//
+//===-- lib/semantics/resolve-names-utils.cpp -----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
#ifndef FORTRAN_SEMANTICS_RESOLVE_NAMES_UTILS_H_
#define FORTRAN_SEMANTICS_RESOLVE_NAMES_UTILS_H_
-// Utility functions and class for use in resolve-names.cc.
+// Utility functions and class for use in resolve-names.cpp.
#include "flang/parser/message.h"
#include "flang/semantics/scope.h"
-//===-- lib/semantics/resolve-names.cc ------------------------------------===//
+//===-- lib/semantics/resolve-names.cpp -----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// N.B C7102 is implicitly enforced by having inaccessible types not
// being found in resolution.
- // More constraints are enforced in expression.cc so that they
+ // More constraints are enforced in expression.cpp so that they
// can apply to structure constructors that have been converted
// from misparsed function references.
for (const auto &component :
-//===-- lib/semantics/rewrite-parse-tree.cc -------------------------------===//
+//===-- lib/semantics/rewrite-parse-tree.cpp ------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/scope.cc --------------------------------------------===//
+//===-- lib/semantics/scope.cpp -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/semantics.cc ----------------------------------------===//
+//===-- lib/semantics/semantics.cpp ---------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/symbol.cc -------------------------------------------===//
+//===-- lib/semantics/symbol.cpp ------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/tools.cc --------------------------------------------===//
+//===-- lib/semantics/tools.cpp -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/type.cc ---------------------------------------------===//
+//===-- lib/semantics/type.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- lib/semantics/unparse-with-symbols.cc -----------------------------===//
+//===-- lib/semantics/unparse-with-symbols.cpp ----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
#===------------------------------------------------------------------------===#
add_library(FortranRuntime
- ISO_Fortran_binding.cc
- derived-type.cc
- descriptor.cc
- file.cc
- format.cc
- io-api.cc
- io-error.cc
- io-stmt.cc
- main.cc
- memory.cc
- stop.cc
- terminator.cc
- tools.cc
- transformational.cc
- type-code.cc
+ ISO_Fortran_binding.cpp
+ derived-type.cpp
+ descriptor.cpp
+ file.cpp
+ format.cpp
+ io-api.cpp
+ io-error.cpp
+ io-stmt.cpp
+ main.cpp
+ memory.cpp
+ stop.cpp
+ terminator.cpp
+ tools.cpp
+ transformational.cpp
+ type-code.cpp
)
target_link_libraries(FortranRuntime
-//===-- runtime/ISO_Fortran_binding.cc ------------------------------------===//
+//===-- runtime/ISO_Fortran_binding.cpp -----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/derived-type.cc -------------------------------------------===//
+//===-- runtime/derived-type.cpp ------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/descriptor.cc ---------------------------------------------===//
+//===-- runtime/descriptor.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/file.cc -----------------------------------------*- C++ -*-===//
+//===-- runtime/file.cpp ----------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/format.cc ---------------------------------------*- C++ -*-===//
+//===-- runtime/format.cpp --------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/io.cc -------------------------------------------*- C++ -*-===//
+//===-- runtime/io.cpp ------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/io-error.cc -------------------------------------*- C++ -*-===//
+//===-- runtime/io-error.cpp ------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/io-stmt.cc --------------------------------------*- C++ -*-===//
+//===-- runtime/io-stmt.cpp -------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/main.cc -----------------------------------------*- C++ -*-===//
+//===-- runtime/main.cpp ----------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/memory.cc ---------------------------------------*- C++ -*-===//
+//===-- runtime/memory.cpp --------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/stop.cc -----------------------------------------*- C++ -*-===//
+//===-- runtime/stop.cpp ----------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/terminate.cc ------------------------------------*- C++ -*-===//
+//===-- runtime/terminate.cpp -----------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/tools.cc ----------------------------------------*- C++ -*-===//
+//===-- runtime/tools.cpp ---------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/transformational.cc ---------------------------------------===//
+//===-- runtime/transformational.cpp --------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- runtime/type-code.cc ----------------------------------------------===//
+//===-- runtime/type-code.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
#===------------------------------------------------------------------------===#
add_executable(quick-sanity-test
- quick-sanity-test.cc
+ quick-sanity-test.cpp
)
target_link_libraries(quick-sanity-test
)
add_executable(thorough-test
- thorough-test.cc
+ thorough-test.cpp
)
target_link_libraries(thorough-test
#===------------------------------------------------------------------------===#
add_library(FortranEvaluateTesting
- testing.cc
- fp-testing.cc
+ testing.cpp
+ fp-testing.cpp
)
add_executable(leading-zero-bit-count-test
- leading-zero-bit-count.cc
+ leading-zero-bit-count.cpp
)
target_link_libraries(leading-zero-bit-count-test
)
add_executable(bit-population-count-test
- bit-population-count.cc
+ bit-population-count.cpp
)
target_link_libraries(bit-population-count-test
)
add_executable(uint128-test
- uint128.cc
+ uint128.cpp
)
target_link_libraries(uint128-test
add_test(PopPar bit-population-count-test)
add_executable(expression-test
- expression.cc
+ expression.cpp
)
target_link_libraries(expression-test
)
add_executable(integer-test
- integer.cc
+ integer.cpp
)
target_link_libraries(integer-test
)
add_executable(intrinsics-test
- intrinsics.cc
+ intrinsics.cpp
)
target_link_libraries(intrinsics-test
)
add_executable(logical-test
- logical.cc
+ logical.cpp
)
target_link_libraries(logical-test
# IEEE exception flags (different use of the word "exception")
# in the actual hardware floating-point status register, so ensure that
# C++ exceptions are enabled for this test.
-set_source_files_properties(real.cc PROPERTIES COMPILE_FLAGS -fexceptions)
+set_source_files_properties(real.cpp PROPERTIES COMPILE_FLAGS -fexceptions)
add_executable(real-test
- real.cc
+ real.cpp
)
target_link_libraries(real-test
)
add_executable(reshape-test
- reshape.cc
+ reshape.cpp
)
target_link_libraries(reshape-test
)
add_executable(ISO-Fortran-binding-test
- ISO-Fortran-binding.cc
+ ISO-Fortran-binding.cpp
)
target_link_libraries(ISO-Fortran-binding-test
)
add_executable(folding-test
- folding.cc
+ folding.cpp
)
target_link_libraries(folding-test
}
// Test flushSubnormalsToZero when folding with host runtime.
-// Subnormal value flushing on host is handle in host.cc
+// Subnormal value flushing on host is handle in host.cpp
// HostFloatingPointEnvironment::SetUpHostFloatingPointEnvironment
// Dummy host runtime functions where subnormal flushing matters
endif()
add_executable(format-test
- format.cc
+ format.cpp
)
target_link_libraries(format-test
add_test(Format format-test)
add_executable(hello-world
- hello.cc
+ hello.cpp
)
target_link_libraries(hello-world
// Test harness context for format control
struct TestFormatContext : virtual public Terminator, public FormatContext {
- TestFormatContext() : Terminator{"format.cc", 1} {}
+ TestFormatContext() : Terminator{"format.cpp", 1} {}
void Emit(const char *, std::size_t);
void HandleSlash(int = 1);
void HandleRelativePosition(int);
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/include")
add_executable(f18
- f18.cc
- dump.cc
+ f18.cpp
+ dump.cpp
)
target_link_libraries(f18
)
add_executable(f18-parse-demo
- f18-parse-demo.cc
- stub-evaluate.cc
+ f18-parse-demo.cpp
+ stub-evaluate.cpp
)
target_link_libraries(f18-parse-demo
-//===-- tools/f18/dump.cc -------------------------------------------------===//
+//===-- tools/f18/dump.cpp ------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- tools/f18/f18-parse-demo.cc ---------------------------------------===//
+//===-- tools/f18/f18-parse-demo.cpp --------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// always run, whatever the case of the source file extension. Unrecognized
// options are passed through to the underlying Fortran compiler.
//
-// This program is actually a stripped-down variant of f18.cc, a temporary
+// This program is actually a stripped-down variant of f18.cpp, a temporary
// scaffolding compiler driver that can test some semantic passes of the
// F18 compiler under development.
-//===-- tools/f18/f18.cc --------------------------------------------------===//
+//===-- tools/f18/f18.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-//===-- tools/f18/stub-evaluate.cc ----------------------------------------===//
+//===-- tools/f18/stub-evaluate.cpp ---------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.