[clang] 8b8b9af - [-Wcalled-once-parameter][NFC] Fix GCC compilation error
Valeriy Savchenko via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 18 04:49:42 PDT 2021
Author: Valeriy Savchenko
Date: 2021-03-18T14:49:24+03:00
New Revision: 8b8b9af8c9132acb446fc42569de8a0f57c6b556
URL: https://github.com/llvm/llvm-project/commit/8b8b9af8c9132acb446fc42569de8a0f57c6b556
DIFF: https://github.com/llvm/llvm-project/commit/8b8b9af8c9132acb446fc42569de8a0f57c6b556.diff
LOG: [-Wcalled-once-parameter][NFC] Fix GCC compilation error
Added:
Modified:
clang/lib/Analysis/CalledOnceCheck.cpp
Removed:
################################################################################
diff --git a/clang/lib/Analysis/CalledOnceCheck.cpp b/clang/lib/Analysis/CalledOnceCheck.cpp
index ab56d3e3c988..00bb51a1c0d3 100644
--- a/clang/lib/Analysis/CalledOnceCheck.cpp
+++ b/clang/lib/Analysis/CalledOnceCheck.cpp
@@ -63,14 +63,14 @@ struct KnownCalledOnceParameter {
unsigned ParamIndex;
};
constexpr KnownCalledOnceParameter KNOWN_CALLED_ONCE_PARAMETERS[] = {
- {"dispatch_async", 1},
- {"dispatch_async_and_wait", 1},
- {"dispatch_after", 2},
- {"dispatch_sync", 1},
- {"dispatch_once", 1},
- {"dispatch_barrier_async", 1},
- {"dispatch_barrier_async_and_wait", 1},
- {"dispatch_barrier_sync", 1}};
+ {llvm::StringLiteral{"dispatch_async"}, 1},
+ {llvm::StringLiteral{"dispatch_async_and_wait"}, 1},
+ {llvm::StringLiteral{"dispatch_after"}, 2},
+ {llvm::StringLiteral{"dispatch_sync"}, 1},
+ {llvm::StringLiteral{"dispatch_once"}, 1},
+ {llvm::StringLiteral{"dispatch_barrier_async"}, 1},
+ {llvm::StringLiteral{"dispatch_barrier_async_and_wait"}, 1},
+ {llvm::StringLiteral{"dispatch_barrier_sync"}, 1}};
class ParameterStatus {
public:
More information about the cfe-commits
mailing list