Skip to content

Commit b18b86b

Browse files
committed
C++: Remove check for value-less literals in constructors
1 parent f0168d0 commit b18b86b

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,6 @@ private predicate ignoreSideEffects(Expr expr) {
154154
* around extractor bugs. Once the relevant extractor bugs are fixed, this predicate can be removed.
155155
*/
156156
private predicate isInvalidFunction(Function func) {
157-
exists(Literal literal |
158-
// Constructor field inits within a compiler-generated copy constructor have a source expression
159-
// that is a `Literal` with no value.
160-
literal = func.(Constructor).getAnInitializer().(ConstructorFieldInit).getExpr() and
161-
not exists(literal.getValue())
162-
)
163-
or
164157
exists(ThisExpr thisExpr |
165158
// An instantiation of a member function template is not treated as a `MemberFunction` if it has
166159
// only non-type template arguments.

0 commit comments

Comments
 (0)