- Jul 27, 2012
-
-
NAKAMURA Takumi authored
llvm-svn: 160850
-
NAKAMURA Takumi authored
llvm-svn: 160849
-
NAKAMURA Takumi authored
llvm-svn: 160848
-
Richard Smith authored
a defaulted special member function until the exception specification is needed (using the same criteria used for the delayed instantiation of exception specifications for function temploids). EST_Delayed is now EST_Unevaluated (using 1330's terminology), and, like EST_Uninstantiated, carries a pointer to the FunctionDecl which will be used to resolve the exception specification. This is enabled for all C++ modes: it's a little faster in the case where the exception specification isn't used, allows our C++11-in-C++98 extensions to work, and is still correct for C++98, since in that mode the computation of the exception specification can't fail. The diagnostics here aren't great (in particular, we should include implicit evaluation of exception specifications for defaulted special members in the template instantiation backtraces), but they're not much worse than before. Our approach to the problem of cycles between in-class initializers and the exception specification for a defaulted default constructor is modified a little by this change -- we now reject any odr-use of a defaulted default constructor if that constructor uses an in-class initializer and the use is in an in-class initialzer which is declared lexically earlier. This is a closer approximation to the current draft solution in core issue 1351, but isn't an exact match (but the current draft wording isn't reasonable, so that's to be expected). llvm-svn: 160847
-
Jordan Rose authored
We were treating this like a CXXDefaultArgExpr, but SubstNonTypeTemplateParmExpr actually appears when a template is instantiated, i.e. we have all the information necessary to evaluate it. This allows us to inline functions like llvm::array_lengthof. <rdar://problem/11949235> llvm-svn: 160846
-
Jordan Rose authored
It's a good thing CallEvents aren't created all over the place yet. I checked all the uses this time and the private copy constructor /really/ shouldn't cause any more problems. llvm-svn: 160845
-
Jordan Rose authored
Passing a temporary via reference parameter still requires a visible copy constructor. llvm-svn: 160840
-
Fariborz Jahanian authored
retainable types in arc, only suggest CFBridgingRelease/ CFBridgingRetain and not the confusing __bridge casts. // rdar://11923822 llvm-svn: 160839
-
Ted Kremenek authored
llvm-svn: 160822
-
Jordan Rose authored
- "cocoa" was moved to "osx.cocoa" a long time ago. - "cplusplus" would be a valid package except we don't have any C++ checkers. llvm-svn: 160821
-
Ted Kremenek authored
instead of walking to the preceding PostStmt node. There are cases where the last evaluated expression does not appear in the ExplodedGraph. Fixes PR 13466. llvm-svn: 160819
-
- Jul 26, 2012
-
-
Jordan Rose authored
After discussion, the type-based dispatch was decided to be bad for maintenance and made it very easy for subtle bugs to creep in. Instead, we'll just be very careful when we do have to allocate these on the heap. llvm-svn: 160817
-
Jordan Rose authored
llvm-svn: 160815
-
Jordan Rose authored
Our BugReporter knows how to deal with implicit statements: it looks in the ParentMap until it finds a parent with a valid location. However, since initializers are not in the body of a constructor, their sub-expressions are not in the ParentMap. That was easy enough to fix in AnalysisDeclContext. ...and then even once THAT was fixed, there's still an extra funny case of Objective-C object pointer fields under ARC, which are initialized with a top-level ImplicitValueInitExpr. To catch these cases, PathDiagnosticLocation will now fall back to the start of the current function if it can't find any other valid SourceLocations. This isn't great, but it's miles better than a crash. (All of this is only relevant when constructors and destructors are being inlined, i.e. under -cfg-add-initializers and -cfg-add-implicit-dtors.) llvm-svn: 160810
-
Jordan Rose authored
This workaround is fairly lame: we simulate the first element's constructor and destructor and rely on the region invalidation to "initialize" the rest of the elements. llvm-svn: 160809
-
Jordan Rose authored
This uses CFG to tell if a constructor call is for a member, and uses the member's region appropriately. llvm-svn: 160808
-
Jordan Rose authored
Previously we were using ParentMap and crawling through the parent DeclStmt. This should be at least slightly cheaper (and is also more flexible). No (intended) functionality change. llvm-svn: 160807
-
Jordan Rose authored
Most of the logic here is fairly simple; the interesting thing is that we now distinguish complete constructors from base or delegate constructors. We also make sure to cast to the base class before evaluating a constructor or destructor, since non-virtual base classes may behave differently. This includes some refactoring of VisitCXXConstructExpr and VisitCXXDestructor in order to keep ExprEngine.cpp as clean as possible (leaving the details for ExprEngineCXX.cpp). llvm-svn: 160806
-
Jordan Rose authored
Test case in the next commit, which enables destructors under certain circumstances. llvm-svn: 160805
-
Jordan Rose authored
This modifies BugReporter and friends to handle CallEnter and CallExitEnd program points that came from implicit call CFG nodes (read: destructors). This required some extra handling for nested implicit calls. For example, the added multiple-inheritance test case has a call graph that looks like this: testMultipleInheritance3 ~MultipleInheritance ~SmartPointer ~Subclass ~SmartPointer ***bug here*** In this case we correctly notice that we started in an inlined function when we reach the CallEnter program point for the second ~SmartPointer. However, when we reach the next CallEnter (for ~Subclass), we were accidentally re-using the inner ~SmartPointer call in the diagnostics. Rather than guess if we saw the corresponding CallExitEnd based on the contents of the active path, we now just ask the PathDiagnostic if there's any known stack before popping off the top path. (A similar issue could have occured without multiple inheritance, but there wasn't a test case for it.) llvm-svn: 160804
-
Jordan Rose authored
At the very least this means initializer nodes for constructors and automatic object destructors are present in the CFG. llvm-svn: 160803
-
Jordan Rose authored
This avoids an assertion crash when we invalidate on a destructor call instead of inlining it. llvm-svn: 160802
-
Jordan Rose authored
llvm-svn: 160801
-
Jordan Rose authored
Fallout from CmpRuns.py API changes in r160314. llvm-svn: 160800
-
Fariborz Jahanian authored
is missing in method prototype. // rdar://11939584 llvm-svn: 160789
-
Alexander Kornienko authored
Put back dump() without a default argument, "because debuggers don't usually respect default arguments". llvm-svn: 160788
-
Alexander Kornienko authored
llvm-svn: 160784
-
Timur Iskhodzhanov authored
llvm-svn: 160783
-
Timur Iskhodzhanov authored
Add more tests for PR13207 (Mangling of template back references with -cxx-abi microsoft) now that PR13389 is fixed (mangling of return types) llvm-svn: 160782
-
Timur Iskhodzhanov authored
llvm-svn: 160780
-
Alexander Kornienko authored
llvm-svn: 160772
-
Anna Zaks authored
- Some cleanup(the TODOs) will be done after ObjC method inlining is complete. - Simplified CallEvent::getDefinition not to require ISDynamicDispatch parameter. - Also addressed Jordan's comments from r160530. llvm-svn: 160768
-
Ted Kremenek authored
llvm-svn: 160767
-
Tanya Lattner authored
llvm-svn: 160766
-
Ted Kremenek authored
llvm-svn: 160764
-
Sylvestre Ledru authored
llvm-svn: 160763
-
- Jul 25, 2012
-
-
Ted Kremenek authored
llvm-svn: 160761
-
Ted Kremenek authored
value by scanning the path, rather than assuming we have visited the '?:' operator as a terminator (which sets a value indicating which expression to grab the final ternary expression value from). llvm-svn: 160760
-
Fariborz Jahanian authored
"memset' lazily when is needed in translation of struct-valued methods which require checkinf of nil receivers outside their bodies. // rdar://11847319 llvm-svn: 160759
-
Ted Kremenek authored
to fix all the issues. Currently the code is essentially unmaintained and buggy, and needs major revision (with coupled enhancements to the analyzer core). llvm-svn: 160754
-