Commit Graph

15428 Commits

Author SHA1 Message Date
Anders Carlsson 458055a890 Revert r80064 since it broke the build.
llvm-svn: 80066
2009-08-26 03:30:14 +00:00
Mike Stump fbddfdacdc Implement virtual dispatch. :-) This is self-consistent with clang, but not yet
necessarily perfectly consistent with gcc.

llvm-svn: 80064
2009-08-26 01:54:35 +00:00
Fariborz Jahanian 2c73b1d2a2 Simplified default construction of array data members
in the constructor prologue.

llvm-svn: 80060
2009-08-26 00:23:27 +00:00
Douglas Gregor 053f691d5e Improve diagnostics and recovery when the nested-name-specifier of a
qualified name does not actually refer into a class/class
template/class template partial specialization. 

Improve printing of nested-name-specifiers to eliminate redudant
qualifiers. Also, make it possible to output a nested-name-specifier
through a DiagnosticBuilder, although there are relatively few places
that will use this leeway.

llvm-svn: 80056
2009-08-26 00:04:55 +00:00
Anders Carlsson 7e3f0e4e0d Parsing of pseudo-destructors.
llvm-svn: 80055
2009-08-25 23:46:41 +00:00
Ted Kremenek 4b1dae3ba4 Update checker build.
llvm-svn: 80054
2009-08-25 23:46:25 +00:00
Ted Kremenek c4c48be88e Fix regression in BasicStoreManager caused by implicitly casting loaded values and trying to load/store from arrays. RegionStoreManager already properly handles these cases well; we just need to gracefully not handle this case in BasicStoreManager. This fixes PR 4781.
llvm-svn: 80051
2009-08-25 23:29:04 +00:00
Ted Kremenek d1d6066be8 Handle pointer arithmetic in RegionStoreManager involving Objective-C pointers
when using the non-fragile Objective-C ABI.  This fixes <rdar://problem/7168531>.

llvm-svn: 80047
2009-08-25 22:55:09 +00:00
Douglas Gregor 24ebdae1e1 Test out-of-line definition of a static data member of a member class of a nested class template. Phew
llvm-svn: 80046
2009-08-25 22:54:02 +00:00
Douglas Gregor 7b6a83a84e Test out-of-line definitions of static data members of nested member class templates
llvm-svn: 80045
2009-08-25 22:53:07 +00:00
Douglas Gregor e861bac059 Improve support for out-of-line definitions of nested templates and
their members, including member class template, member function
templates, and member classes and functions of member templates.

To actually parse the nested-name-specifiers that qualify the name of
an out-of-line definition of a member template, e.g.,

  template<typename X> template<typename Y>
  X Outer<X>::Inner1<Y>::foo(Y) {
    return X();
  }

we need to look for the template names (e.g., "Inner1") as a member of
the current instantiation (Outer<X>), even before we have entered the
scope of the current instantiation. Since we can't do this in general
(i.e., we should not be looking into all dependent
nested-name-specifiers as if they were the current instantiation), we
rely on the parser to tell us when it is parsing a declaration
specifier sequence, and, therefore, when we should consider the
current scope specifier to be a current instantiation.

Printing of complicated, dependent nested-name-specifiers may be
somewhat broken by this commit; I'll add tests for this issue and fix
the problem (if it still exists) in a subsequent commit.

llvm-svn: 80044
2009-08-25 22:51:20 +00:00
John McCall 76d824f3f9 Clarify the difference between substitution and instantiation by renaming
functions that don't instantiate definitions.

llvm-svn: 80037
2009-08-25 22:02:44 +00:00
Ted Kremenek 7656f2b48b Update checker build.
llvm-svn: 80034
2009-08-25 21:14:54 +00:00
Ted Kremenek 3ed9543ace Fix crash reported in <rdar://problem/7124210> by "back-porting" some of the
implicit cast logic in RegionStoreManager to BasicStoreManager. This involved
moving CastRetriedVal from RegionStoreManager to StoreManager.

llvm-svn: 80026
2009-08-25 20:51:30 +00:00
Steve Naroff 930210446f Update Xcode project file to include indexing source files.
llvm-svn: 80022
2009-08-25 19:57:00 +00:00
Fariborz Jahanian 4174f2de26 Changed condition of an assert.
llvm-svn: 80020
2009-08-25 18:53:16 +00:00
Ted Kremenek 3a459dc8c9 Move logic of GRExprEngine::EvalBinOp to SValuator::EvalBinOp.
llvm-svn: 80018
2009-08-25 18:44:25 +00:00
John McCall 1dfa9a9872 Modify an assert to capture the restriction on friend declarations more
accurately.  Prevents the assert from triggering incorrectly when friending 
functions first declared in extern "C" contexts.  Fixes bug 4757.

llvm-svn: 80016
2009-08-25 17:53:59 +00:00
Douglas Gregor 1d5e9f9368 Implement out-of-line definitions of nested class templates. Most of
the logic is there for out-of-line definitions with multiple levels of
nested templates, but this is still a work-in-progress: we're having
trouble determining when we should look into a dependent
nested-name-specifier. 

llvm-svn: 80003
2009-08-25 17:23:04 +00:00
Fariborz Jahanian 797cf62703 Skip over bases/fields with dependent types.
Fixes pr4771.

llvm-svn: 79999
2009-08-25 16:37:49 +00:00
Fariborz Jahanian 68f051594b Test case for r79968 (courtesy of Anders).
llvm-svn: 79998
2009-08-25 16:09:22 +00:00
Douglas Gregor 885149b504 Sanity checking for statement reference counts. Thanks for the suggestion, Fariborz
llvm-svn: 79995
2009-08-25 15:47:45 +00:00
Dan Gohman a98e0e73de Update clang for raw_fd_ostream no longer requiring F_Force.
llvm-svn: 79991
2009-08-25 15:36:09 +00:00
Douglas Gregor 7315672a60 Add a little more testing for default arguments of constructors in a class template
llvm-svn: 79989
2009-08-25 15:24:38 +00:00
Anders Carlsson be96bc94e8 Handle the implicit 'this' parameter for format attributes.
llvm-svn: 79987
2009-08-25 14:12:34 +00:00
Anders Carlsson 114056f22c If a parameter has a default argument expression, make sure to instantiate the parameter type before checking that the expression is a valid initializer.
llvm-svn: 79986
2009-08-25 13:46:13 +00:00
Anders Carlsson 6c0a6e490c Emit conversion functions correctly.
llvm-svn: 79985
2009-08-25 13:14:46 +00:00
Anders Carlsson 10ebe78730 Improved support for default arguments in constructors for class templates.
llvm-svn: 79984
2009-08-25 13:07:08 +00:00
Zhongxing Xu 342950efc5 Remove CodeDecl and CFG from GRExprEngine and GRStateManager.
Now AnalysisManager is the only place we can get CodeDecl.
This leads to an API change: GRState::bindExpr() now takes the CFG argument.

llvm-svn: 79980
2009-08-25 06:51:30 +00:00
Devang Patel 79e3fa6e9d Remove a test that relies on old debug info format.
llvm-svn: 79979
2009-08-25 06:18:11 +00:00
Anders Carlsson c1eb79b7c9 InitializeVarWithConstructor now returns true on failure.
llvm-svn: 79976
2009-08-25 05:18:00 +00:00
Anders Carlsson 6eb55575da BuildCXXConstructExpr now returns an OwningExprResult.
llvm-svn: 79975
2009-08-25 05:12:04 +00:00
Anders Carlsson 355933d096 Factor building of CXXDefaultArgExpr expressions out into a separate function.
llvm-svn: 79974
2009-08-25 03:49:14 +00:00
Zhongxing Xu 94ec649b33 Remove Decl and CFG from ExplodedGraph. This leads to a series small changes.
llvm-svn: 79973
2009-08-25 03:33:41 +00:00
Anders Carlsson 4562f1f066 Basic support for default argument expressions for function templates.
llvm-svn: 79972
2009-08-25 03:18:48 +00:00
Anders Carlsson c80a127c4d Factor setting default arguments out into SetParamDefaultArgument.
llvm-svn: 79970
2009-08-25 02:29:20 +00:00
Anders Carlsson 12e022ddbf Fix ivar layout map generation (hopefully).
llvm-svn: 79968
2009-08-25 02:07:02 +00:00
Anders Carlsson 5a532380a1 Use hasDefaultArg instead of getDefaultArg.
llvm-svn: 79967
2009-08-25 01:23:32 +00:00
Anders Carlsson a5224ecbc0 Add Decl getter/setters for uninstantiated default arguments for function parameters.
llvm-svn: 79965
2009-08-25 01:11:14 +00:00
Anders Carlsson f1c2695d48 Check that the default argument is well-formed before checking the initializer types.
llvm-svn: 79964
2009-08-25 01:02:06 +00:00
Douglas Gregor 9d01b5b40c Eliminate a GCC warning
llvm-svn: 79962
2009-08-25 00:17:23 +00:00
Fariborz Jahanian a6a3494c1d Remove #ifdef'out code.
llvm-svn: 79956
2009-08-24 23:16:37 +00:00
Douglas Gregor a3dff8e37a Keep track of the template parameter depth properly when we have
member templates declared inside other templates. This allows us to
match out-of-line definitions of member function templates within
class templates to the declarations within the class template. We
still can't handle out-of-line definitions for member class templates,
however.

llvm-svn: 79955
2009-08-24 23:03:25 +00:00
Ted Kremenek 6bc04bca68 Add test case for PR 4759.
llvm-svn: 79954
2009-08-24 22:56:32 +00:00
Ted Kremenek d6cfbafd3b ConstraintManager::AssumeDual now accepts a 'DefinedSVal' instead of 'SVal' for
the condition. This eliminates a source of bugs where the client doesn't
correctly reason about undefined or unknown values. This fixes PR 4759.

llvm-svn: 79952
2009-08-24 22:47:34 +00:00
Ted Kremenek d64be8201d Introduce 'DefinedSVal', an intermediate parent class between Loc/NonLoc and
SVal. This allows us to use the C++ type system to distinguish between SVals
that are potentially unknown/undefined and those that are not.

llvm-svn: 79951
2009-08-24 22:41:15 +00:00
Daniel Dunbar f5147c6c02 Add missing '&&'...
llvm-svn: 79950
2009-08-24 22:29:04 +00:00
Daniel Dunbar a6b4a3d646 PR4766: Don't pass -static to 'as' on x86_64 on Darwin.
Also, do pass -static even with -dynamic on i386.

llvm-svn: 79948
2009-08-24 22:26:16 +00:00
Fariborz Jahanian 7c07d5fed8 Remove ivarlayout bitmap optimization, instead if all zeros,
put out the bitmap when all objects are scanned.

llvm-svn: 79947
2009-08-24 21:55:06 +00:00
Douglas Gregor 4c95288f64 Don't try to evaluate an expression that is type- or value-dependent while building the CFG
llvm-svn: 79941
2009-08-24 21:39:56 +00:00