Reviewed By: jvillard Differential Revision: D9850969 fbshipit-source-id: 25102d5bbmaster
parent
b838b7bc46
commit
3c04f32709
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2018-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
enum VALUE {
|
||||
VALUE1,
|
||||
VALUE2,
|
||||
};
|
||||
|
||||
vector<int> global_v = {1, 2, 3};
|
||||
|
||||
struct A {
|
||||
int a;
|
||||
int b;
|
||||
};
|
||||
|
||||
int f(int x) { return x + 1; }
|
||||
|
||||
int test(int x) {
|
||||
A a{1, 2};
|
||||
pair<int, int> p = {3, 4};
|
||||
vector<int> v1;
|
||||
vector<int> v2{1}; // const
|
||||
static vector<int> v3 = {1, 2};
|
||||
vector<VALUE> v4 = {VALUE1, VALUE2}; // const
|
||||
vector<int> v5 = {f(1), f(2), 3}; // const
|
||||
vector<int> v6 = {f(x), 2, 3};
|
||||
|
||||
map<string, int> m1{{"a", 1}, {"b", 2}};
|
||||
|
||||
return a.a + p.first;
|
||||
}
|
@ -1,21 +1,12 @@
|
||||
codetoanalyze/cpp/linters/cxxconst.cpp, test, 24, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/cxxconst.cpp, test, 27, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/cxxconst.cpp, test, 29, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/cxxconst.cpp, test, 30, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/cxxconst.cpp, test, 31, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/cxxconst.cpp, test, 33, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/extracopy.cpp, test_a, 27, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/cxxconst.cpp, test, 28, CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/cxxconst.cpp, test, 31, CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/cxxconst.cpp, test, 33, CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/cxxconst.cpp, test, 34, CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/cxxconst.cpp, test, 37, CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/extracopy.cpp, test_a, 27, EXTRA_COPY, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/extracopy.cpp, test_a, 28, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/extracopy.cpp, test_const_exp, 53, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/extracopy.cpp, test_map, 36, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/extracopy.cpp, test_map, 37, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/extracopy.cpp, test_map, 36, CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/extracopy.cpp, test_map, 37, EXTRA_COPY, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/extracopy.cpp, test_map, 40, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/extracopy.cpp, test_map, 43, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/iter.cpp, test, 11, ITERATOR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/iter.cpp, test, 12, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/iter.cpp, test, 12, EXTRA_COPY, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/iter.cpp, test, 12, ITERATOR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/type_namespace.cpp, test, 11, CXX11_CONSTANT_EXPR, no_bucket, WARNING, []
|
||||
codetoanalyze/cpp/linters/type_namespace.cpp, test, 11, NAMESPACE_STRING, no_bucket, WARNING, []
|
||||
|
Loading…
Reference in new issue