llvm-project/clang/lib/Tooling/Syntax
Dmitri Gribenko e10df779f0 Fix clang Wrange-loop-analysis in BuildTree.cpp
Building on Mac OS with clang 12:

```
jhemphill@jhemphill-mbp build % clang --version
Apple clang version 12.0.0 (clang-1200.0.26.2)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
```

yields one warning:

```
/Users/jhemphill/oss/llvm-project/clang/lib/Tooling/Syntax/BuildTree.cpp:1126:22: warning: loop variable 'Arg' is always a copy because the range of type 'llvm::iterator_range<clang::Stmt::CastIterator<clang::Expr, clang::Expr *, clang::Stmt *> >' does not return a reference [-Wrange-loop-analysis]
    for (const auto &Arg : Args) {
                     ^
/Users/jhemphill/oss/llvm-project/clang/lib/Tooling/Syntax/BuildTree.cpp:1126:10: note: use non-reference type 'clang::Expr *'
    for (const auto &Arg : Args) {
```

It appears that `Arg` is an `Expr*`, passed by value rather than by const reference.

Reviewed By: eduucaldas, gribozavr2

Differential Revision: https://reviews.llvm.org/D87482
2020-09-12 01:07:54 +02:00
..
BuildTree.cpp Fix clang Wrange-loop-analysis in BuildTree.cpp 2020-09-12 01:07:54 +02:00
CMakeLists.txt [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
ComputeReplacements.cpp [SyntaxTree] Add const qualifiers, from [llvm-qualified-auto] 2020-09-11 18:39:02 +00:00
Mutations.cpp [SyntaxTree] Rename functions to start with verb 2020-09-11 14:54:18 +00:00
Nodes.cpp [SyntaxTree] Rename functions to start with verb 2020-09-11 14:54:18 +00:00
Synthesis.cpp [SyntaxTree][Synthesis] Add support for Tree. 2020-09-11 20:37:23 +00:00
Tokens.cpp [Syntax] expose API for expansions overlapping a spelled token range. 2020-07-20 14:48:12 +02:00
Tree.cpp [SyntaxTree] Add const qualifiers, from [llvm-qualified-auto] 2020-09-11 18:39:02 +00:00