mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 14:25:49 +00:00
Bug 1468811 - Re-enable clang-tidy check performance-faster-string-find. r=sylvestre
It already had test files, but wasn't actually enabled. Also add a mock internal std::string::find signature; two comments about disabled checks; and fix a typo.
This commit is contained in:
parent
f6609edce0
commit
a4701a58b0
@ -17,6 +17,7 @@ clang_checkers:
|
||||
publish: !!bool yes
|
||||
- name: clang-analyzer-security.insecureAPI.getpw
|
||||
publish: !!bool yes
|
||||
# We don't add clang-analyzer-security.insecureAPI.gets here; it's deprecated.
|
||||
- name: clang-analyzer-security.insecureAPI.mkstemp
|
||||
publish: !!bool yes
|
||||
- name: clang-analyzer-security.insecureAPI.mktemp
|
||||
@ -72,8 +73,13 @@ clang_checkers:
|
||||
publish: !!bool no
|
||||
- name: mozilla-*
|
||||
publish: !!bool yes
|
||||
- name: performance-faster-string-find
|
||||
publish: !!bool yes
|
||||
- name: performance-for-range-copy
|
||||
publish: !!bool yes
|
||||
# Only available from clang tidy 6.0. We are currently using 5.0
|
||||
# - name: performance-implicit-conversion-in-loop
|
||||
# publish: !!bool yes
|
||||
- name: performance-inefficient-string-concatenation
|
||||
publish: !!bool yes
|
||||
- name: performance-inefficient-vector-operation
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <string>
|
||||
#include "structures.h"
|
||||
|
||||
void foo() {
|
||||
std::string str;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Proxy file in order to define generic data types, to void binding with system headers
|
||||
// Proxy file in order to define generic data types, to avoid binding with system headers
|
||||
|
||||
namespace std {
|
||||
|
||||
@ -41,6 +41,7 @@ public:
|
||||
~basic_string() {}
|
||||
size_t size() const;
|
||||
bool empty() const;
|
||||
size_t find (const char* s, size_t pos = 0) const;
|
||||
const T *c_str() const;
|
||||
_Type& assign(const T *s);
|
||||
basic_string<T> *operator+=(const basic_string<T> &) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user