From 580cd17f256259f39a382e967173f34d68e73859 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Fri, 28 Sep 2012 17:15:25 +0000 Subject: [analyzer] Handle inlined constructors for rvalue temporaries correctly. Previously the analyzer treated all inlined constructors like lvalues, setting the value of the CXXConstructExpr to the newly-constructed region. However, some CXXConstructExprs behave like rvalues -- in particular, the implicit copy constructor into a pass-by-value argument. In this case, we want only the /contents/ of a temporary object to be passed, so that we can use the same "copy each argument into the parameter region" algorithm that we use for scalar arguments. This may change when we start modeling destructors of temporaries, but for now this is the last part of . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164830 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/array-struct-region.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'test/Analysis/array-struct-region.cpp') diff --git a/test/Analysis/array-struct-region.cpp b/test/Analysis/array-struct-region.cpp index 22fbf2ff33..e7fbe4d987 100644 --- a/test/Analysis/array-struct-region.cpp +++ b/test/Analysis/array-struct-region.cpp @@ -61,12 +61,6 @@ int getAssignedField(struct S s) { void testArgument() { clang_analyzer_eval(getConstrainedField(getS()) == 42); // expected-warning{{TRUE}} -#if __cplusplus - // FIXME: Passing the struct by value seems to be confusing C++. - // Possibly related to . - // expected-warning@-4{{UNKNOWN}} -#endif - clang_analyzer_eval(getAssignedField(getS()) == 42); // expected-warning{{TRUE}} } -- cgit v1.2.3-18-g5258