summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/llvm-cov.cpp
diff options
context:
space:
mode:
authorPatrik Hagglund <patrik.h.hagglund@ericsson.com>2014-09-18 11:52:57 +0000
committerPatrik Hagglund <patrik.h.hagglund@ericsson.com>2014-09-18 11:52:57 +0000
commit07ccb1075ad80c36dcbdc7d594cb0b9c71074c8c (patch)
treee697cfa6c636251e1fa7985cb4c148e79788ea13 /llvm/tools/llvm-cov/llvm-cov.cpp
parentb9fb5a2cc66cf2081f8d5b59bed1c505a35a6177 (diff)
downloadbcm5719-llvm-07ccb1075ad80c36dcbdc7d594cb0b9c71074c8c.tar.gz
bcm5719-llvm-07ccb1075ad80c36dcbdc7d594cb0b9c71074c8c.zip
Alternative (to r216344) fix of gcc -Wpedantic.
As suggested by David Blaikie, this may be easier to read. The original warning was: ../tools/llvm-cov/llvm-cov.cpp:53:49: error: ISO C++ forbids zero-size array 'argv' [-Werror=pedantic] std::string Invocation(std::string(argv[0]) + " " + argv[1]); It seems to be the case that GCC's warning gets confused and thinks 'argv' is a declaration here. GCC bugzilla issue #61259. llvm-svn: 218048
Diffstat (limited to 'llvm/tools/llvm-cov/llvm-cov.cpp')
-rw-r--r--llvm/tools/llvm-cov/llvm-cov.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cov/llvm-cov.cpp b/llvm/tools/llvm-cov/llvm-cov.cpp
index 0a540b7a929..8c1ad8bedb3 100644
--- a/llvm/tools/llvm-cov/llvm-cov.cpp
+++ b/llvm/tools/llvm-cov/llvm-cov.cpp
@@ -50,7 +50,7 @@ int main(int argc, const char **argv) {
func = gcov_main;
if (func) {
- std::string Invocation(std::string() + argv[0] + " " + argv[1]);
+ std::string Invocation = std::string(argv[0]) + " " + argv[1];
argv[1] = Invocation.c_str();
return func(argc - 1, argv + 1);
}
OpenPOWER on IntegriCloud