Details
Diff Detail
- Build Status
Buildable 6448 Build 6448: arc lint + arc unit
Event Timeline
clang-tidy/performance/InefficientVectorOperationCheck.cpp | ||
---|---|---|
92 | I'd use ignoringImplicit(VectorAppendCallExpr) to ignore ExprWithCleanups. |
clang-tidy/performance/InefficientVectorOperationCheck.cpp | ||
---|---|---|
208 | Diagnostic builder should be able to format NamedDecls directly, this ->getDeclName() is not necessary. The only difference is that it will likely add quotes around the name, which seems to be good anyway. |
clang-tidy/performance/InefficientVectorOperationCheck.cpp | ||
---|---|---|
92 | Good to know. Thanks! | |
208 | I tried it, but I found the behavior between using getDeclName() and not using getDeclName() is different when handling the template functions:
|
clang-tidy/performance/InefficientVectorOperationCheck.cpp | ||
---|---|---|
50 | nit: No need for the actual strings to be that long, since you're only using the corresponding constant names in the code. Even though there's no small string optimization used for bound AST nodes (they are stored in a std::map<std::string, ast_type_traits::DynTypedNode>), maps are frequently compared, which is less wasteful with shorter strings. It would be interesting to see how large is the impact of longer or shorter string IDs, but until then we can still avoid overly long names. | |
208 | Good to know. | |
test/clang-tidy/performance-inefficient-vector-operation.cpp | ||
158 | This pattern is ambiguous. I'd use unique variable name for each test to avoid patterns matching incorrect lines. |
nit: No need for the actual strings to be that long, since you're only using the corresponding constant names in the code. Even though there's no small string optimization used for bound AST nodes (they are stored in a std::map<std::string, ast_type_traits::DynTypedNode>), maps are frequently compared, which is less wasteful with shorter strings.
It would be interesting to see how large is the impact of longer or shorter string IDs, but until then we can still avoid overly long names.