llvm-project/clang/lib/Tooling
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
..
ASTDiff [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
Core [AST] Remove DeclCXX.h dep on ASTContext.h 2020-04-06 10:09:01 -07:00
DependencyScanning [Support] On Windows, ensure hardware_concurrency() extends to all CPU sockets and all NUMA groups 2020-02-14 10:24:22 -05:00
Inclusions [Tooling][Format] Treat compound extensions (foo.bar.cc) as matching foo.h 2020-08-27 15:24:17 +02:00
Refactoring [clang][nearly-NFC] Remove some superfluous uses of NamedDecl::getNameAsString 2020-08-05 13:54:37 +01:00
Syntax Fix clang Wrange-loop-analysis in BuildTree.cpp 2020-09-12 01:07:54 +02:00
Transformer [libTooling] Fix use of `char` in comparison. 2020-09-11 12:24:09 +00:00
AllTUsExecution.cpp Prune TargetInfo.h include from ParsedAttr.h, NFC 2020-03-11 20:47:11 -07:00
ArgumentsAdjusters.cpp getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver 2020-09-08 10:21:18 +02:00
CMakeLists.txt [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
CommonOptionsParser.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
CompilationDatabase.cpp [NFC] Refactor Registry loops to range for 2020-06-19 00:40:10 +01:00
Execution.cpp [NFC] Refactor Registry loops to range for 2020-06-19 00:40:10 +01:00
ExpandResponseFilesCompilationDatabase.cpp Remove unused Endian.h includes, NFC 2020-03-11 15:45:34 -07:00
FileMatchTrie.cpp [clang][Tooling] Try to avoid file system access if there is no record for the file in compile_commads.json 2020-07-17 18:49:14 +02:00
FixIt.cpp [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation. 2019-04-05 14:05:03 +00:00
GuessTargetAndModeCompilationDatabase.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
InterpolatingCompilationDatabase.cpp Fix syntax error 2020-04-09 13:46:23 -07:00
JSONCompilationDatabase.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Refactoring.cpp [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
RefactoringCallbacks.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
StandaloneExecution.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Tooling.cpp [flang][driver] Add the new flang compiler and frontend drivers 2020-09-11 10:55:54 +01:00