Commit Graph

13349 Commits

Author SHA1 Message Date
Anders Carlsson 36d87e179a Add setters/getters to CXXMethodDecl so it can keep track of which virtual member functions it overrides (if any)
llvm-svn: 71968
2009-05-16 23:58:37 +00:00
Eli Friedman 15af3ee6a9 Make the RAII extension warning silencing for __extension__ a bit
narrower, so it doesn't catch expresions that aren't sub-expressions of
__extension__ operator.

llvm-svn: 71967
2009-05-16 23:40:44 +00:00
Eli Friedman 678d3bac03 Targets without long long should reduce the size of intmax_t
accordingly.

llvm-svn: 71966
2009-05-16 23:30:57 +00:00
Eli Friedman ce7f900b3b Refactor address-of-void extension a bit so that it's more obviously
correct.  No functionality change, as far as I know.

llvm-svn: 71965
2009-05-16 23:27:50 +00:00
Eli Friedman c3dcdd0980 A few minor updates to the user manual.
llvm-svn: 71964
2009-05-16 23:17:30 +00:00
Anders Carlsson 7bf3c4227d Fix another case where the extern-ness of extern "C" wasn't being captured.
This makes me think that we should make hasExternalStorage perform this check...

llvm-svn: 71962
2009-05-16 22:05:23 +00:00
Anders Carlsson 5b53576fe4 Don't return member pointer types for static member functions. Fixes 6879261.
llvm-svn: 71961
2009-05-16 21:43:42 +00:00
Eli Friedman b529b01985 PR3942: Don't warn on unsigned overflow in preprocessor expressions.
llvm-svn: 71960
2009-05-16 21:24:10 +00:00
Anders Carlsson d3a69ceaaf extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.
llvm-svn: 71957
2009-05-16 21:02:39 +00:00
Anders Carlsson 524d5a4f5a Improve checking of member expressions where the base type is a dependent type.
llvm-svn: 71956
2009-05-16 20:31:20 +00:00
Daniel Dunbar f39ea8535b Update test case; I'm confused why this wasn't failing on the buildbot
though?

llvm-svn: 71955
2009-05-16 19:30:01 +00:00
Sebastian Redl 45be55d181 Test case for previous commit. Explicit instantiation does the trick. (Thanks, Anders.)
llvm-svn: 71954
2009-05-16 18:59:35 +00:00
Sebastian Redl e769ecf8ab Implement instantiation of a few boring, simple expressions. I don't think these are testable yet, though.
llvm-svn: 71953
2009-05-16 18:50:46 +00:00
Eli Friedman 4f8b8ed2ac Missing change for r71941 (PR2044).
llvm-svn: 71947
2009-05-16 13:58:00 +00:00
Eli Friedman 168fe15b0d Avoid calling mergeTypes in C++. I think these are the correct C++
alternatives, but please correct me if I'm wrong.

I eventually plan to assert in mergeTypes that we aren't in C++ mode 
because composite types are fundamentally not a part of C++. The 
remaining callers for code in the regression tests are 
Sema::WarnConflictingTypedMethods and CodeGenFunction::EmitFunctionProlog;
I'm not quite sure what the correct approach is for those callers.

llvm-svn: 71946
2009-05-16 13:54:38 +00:00
Eli Friedman e2cad65015 Add stricter checking for va_arg.
llvm-svn: 71942
2009-05-16 12:46:54 +00:00
Eli Friedman 54135838e2 PR2044: reject declarations of functions returning variably modified
types.

llvm-svn: 71941
2009-05-16 12:15:55 +00:00
Eli Friedman 0b4af8f755 PR3009: Get rid of bogus warning for scalar compound literals.
This patch isn't quite ideal in that it eliminates the warning for 
constructs like "int a = {1};", where the braces are in fact redundant.  
However, that would have required a bunch of refactoring, and it's 
much less likely to cause confusion compared to redundant nested braces.

llvm-svn: 71939
2009-05-16 11:45:48 +00:00
Mike Stump 18bb9284ff Reflow some comments.
llvm-svn: 71937
2009-05-16 07:57:57 +00:00
Mike Stump 87c57acfb7 Reflow some comments.
llvm-svn: 71936
2009-05-16 07:39:55 +00:00
Mike Stump 6814d1c126 Implement a FIXME, we now pass in the locations of the braces for enums.
llvm-svn: 71930
2009-05-16 07:06:02 +00:00
Ted Kremenek f0d3237474 Update checker build.
llvm-svn: 71929
2009-05-16 06:05:27 +00:00
Eli Friedman b05c41e0a1 Remove useless wrapper.
llvm-svn: 71928
2009-05-16 05:56:02 +00:00
Mike Stump b9075ae9f7 Fixup __extension__ i = 1 parsing. Thanks Eli!
llvm-svn: 71927
2009-05-16 04:31:34 +00:00
Ted Kremenek e4302ee3bb Fix: <rdar://problem/6893565> False positive: don't flag leaks for return types that cannot be determined to be CF types
llvm-svn: 71921
2009-05-16 01:38:01 +00:00
Ted Kremenek a28565ac62 Fix another bug in BugReporter where we wouldn't always select the bug report in a bug equivalence class with the shortest path.
llvm-svn: 71920
2009-05-16 01:11:58 +00:00
Douglas Gregor 30776d419f Template instantiation for IndirectGotoStmt. Now my life is complete.
llvm-svn: 71917
2009-05-16 00:20:29 +00:00
Douglas Gregor 2a2d00f041 Template instantiation for switch statements
llvm-svn: 71916
2009-05-15 23:57:33 +00:00
Fariborz Jahanian 6404c420e5 Removed superfluous code.
llvm-svn: 71909
2009-05-15 23:19:35 +00:00
Fariborz Jahanian 4447e17c03 Early support for __format__attribute on blocks.
Work in progress...

llvm-svn: 71908
2009-05-15 23:15:03 +00:00
Anders Carlsson 789e2cce54 Basic support for member exprs where the base expr type is dependent.
llvm-svn: 71907
2009-05-15 23:10:19 +00:00
Daniel Dunbar 9a017d7fcf Classes with "+load" methods need to go in the non-lazy class list (or
else the method will not be found by the runtime at class load time).

llvm-svn: 71904
2009-05-15 22:33:15 +00:00
Douglas Gregor ca60224bbe Template instantiation for break and continue statements.
llvm-svn: 71903
2009-05-15 22:32:39 +00:00
Douglas Gregor e5cc0f3288 Introduce the EXPR macro into StmtNodes.def, so that we can
distinguish between expression and statement nodes. No functionality
change.

llvm-svn: 71902
2009-05-15 22:19:30 +00:00
Douglas Gregor 5d13868263 Template instantiation for "for" loops
llvm-svn: 71901
2009-05-15 22:12:32 +00:00
Ted Kremenek 926dffce01 Update checker build.
llvm-svn: 71900
2009-05-15 21:56:27 +00:00
Douglas Gregor 3daa82dba0 Template instantiation for do-while statements.
llvm-svn: 71899
2009-05-15 21:56:04 +00:00
Daniel Dunbar 19573e7d29 Factor code for adding module-level class lists into separate method.
- No functionality change.

llvm-svn: 71898
2009-05-15 21:48:48 +00:00
Mike Stump 76b824c388 Fixup parsing for (throw,throw) and __extension__ throw 1.
llvm-svn: 71897
2009-05-15 21:47:08 +00:00
Douglas Gregor 8a930c3b73 Template instantiation for WhileStmt and CXXConditionDeclExpr.
llvm-svn: 71896
2009-05-15 21:45:53 +00:00
Douglas Gregor 8d2ad873e7 Make sure that we use the canonical type for the names of instantiated
constructors and destructors. This is a requirement of
DeclarationNameTable::getCXXSpecialName that we weren't assert()'ing,
so it should have been caught much earlier :(

Big thanks to Anders for the test case.

llvm-svn: 71895
2009-05-15 21:18:27 +00:00
Fariborz Jahanian 6802ed9968 improved on diagnosing misplacement of sentinel attributes.
No change in functionality.

llvm-svn: 71894
2009-05-15 21:18:04 +00:00
Ted Kremenek eef7a21507 Add hack to scan-build to fix PR 4215
(http://llvm.org/bugs/show_bug.cgi?id=4215): When xcodebuild is invoked with
-sdk iphonesimulator3.0, use gcc-4.2 instead of the system default gcc.

llvm-svn: 71891
2009-05-15 21:14:16 +00:00
Fariborz Jahanian 5e15186c9a added -fblocks to the test.
llvm-svn: 71890
2009-05-15 20:49:33 +00:00
Douglas Gregor 3f17b47c7e Allow instantiation of NULL expressions and statements
llvm-svn: 71889
2009-05-15 20:47:12 +00:00
Fariborz Jahanian 0aa5c4565d This patch finishes off the sentinel attribute handling for
blocks and function pointers.

llvm-svn: 71888
2009-05-15 20:33:25 +00:00
Anders Carlsson 2cf4387931 I take it back, InstantiateExpr does not check for null.
llvm-svn: 71887
2009-05-15 20:29:28 +00:00
Anders Carlsson 1f911dce22 Instantiation support for 'this'
llvm-svn: 71886
2009-05-15 20:26:03 +00:00
Anders Carlsson 50574f5303 No need to null check the expr, Sema::SemaRef.InstantiateExpr handles all that.
llvm-svn: 71885
2009-05-15 20:10:48 +00:00
Anders Carlsson 2101e68398 Add SemaTemplateInstantiateStmt.cpp to Xcode project.
llvm-svn: 71884
2009-05-15 20:08:59 +00:00
Douglas Gregor 1ec5e9f025 Make sure that the type associated with a class template is dependent.
llvm-svn: 71878
2009-05-15 19:11:46 +00:00
Douglas Gregor 9d73cabf22 Template instantiation for "if" statements. Also:
- Skip semantic analysis of the "if" condition if it is type-dependent.
  - Added the location of the "else" keyword into IfStmt, so that we can
    provide it for type-checking after template instantiation.

llvm-svn: 71875
2009-05-15 18:53:42 +00:00
Ted Kremenek a3d4d7b4fa Update checker build.
llvm-svn: 71874
2009-05-15 18:40:51 +00:00
Anders Carlsson 37604a0984 A C++ member function always has either weak linkage (if it's inline or defined inline) or strong linkage (other cases).
llvm-svn: 71873
2009-05-15 18:35:39 +00:00
Douglas Gregor 82049e6bdd Move statement instantiation into its own file. No functionality change
llvm-svn: 71872
2009-05-15 18:22:25 +00:00
Douglas Gregor 12c3a5cedf When word-wrapping, be more defensive about a ridiculously small number of columns. Fixes <rdar://problem/6892178>
llvm-svn: 71870
2009-05-15 18:05:24 +00:00
Douglas Gregor 67da0d97e6 Call ActOnStartOfFunctionDecl/ActOnFinishFunctionBody when
instantiating the definition of a function from a template.

llvm-svn: 71869
2009-05-15 17:59:04 +00:00
Anders Carlsson f6e9ece507 Name mangling for class template specializations and template arguments.
llvm-svn: 71861
2009-05-15 16:09:15 +00:00
Chris Lattner 4579b76ff6 Fix processing of -Ufoo to not inject "#undef foo 1" into the predefines
buffer.  This caused exciting nonsense like this:

$ clang t.c -fsyntax-only -UMACRO
In file included from <built-in>:104:
<command line>:1:14: warning: extra tokens at end of #undef directive [-Wextra-tokens]
#undef MACRO 1
             ^
             //
1 diagnostic generated.

rdar://6891800

llvm-svn: 71860
2009-05-15 16:08:43 +00:00
Ted Kremenek 3281977dbb Fix crash when deriving the enclosing summary of a method whose first selector slot has a null IdentifierInfo*. This happens when analyzing Growl.
llvm-svn: 71857
2009-05-15 15:49:00 +00:00
Ted Kremenek 4785e41c12 Remove extra whitespace character in string literal. Purely cosmetic.
llvm-svn: 71847
2009-05-15 06:02:08 +00:00
Ted Kremenek 2aab87f393 Update checker build.
llvm-svn: 71846
2009-05-15 05:59:34 +00:00
Ted Kremenek 3d436c7b35 Use dyn_cast instead of cast to allow our assumptions to be safely wrong.
llvm-svn: 71843
2009-05-15 05:34:49 +00:00
Ted Kremenek 608a6176a1 Cleanup internal checks bug reporting, allowing intermediate diagnostics to be generated for bad argument warnings, bad branches, etc.
llvm-svn: 71838
2009-05-15 05:25:09 +00:00
Ted Kremenek 46727df06a Re-enable passing analyzer options from scan-build to ccc-analyzer.
llvm-svn: 71836
2009-05-15 04:20:31 +00:00
Ted Kremenek f9903da7fa Don't strip quotes in compiler line for -D arguments.
Fixes PR 4205.

llvm-svn: 71835
2009-05-15 04:07:18 +00:00
Ted Kremenek 73777059f0 BugReporter (extensive diagnostics): Do not include the range of target '}'
llvm-svn: 71832
2009-05-15 02:46:13 +00:00
Ted Kremenek 18665fe3c9 PathDiagnosticLocation::asRange(): for a PathDiagnosticLocation, the range of a DeclStmt is only the decl, not
the decl + initializer.

llvm-svn: 71831
2009-05-15 02:05:25 +00:00
Ted Kremenek cfe7d02b2c BugReporter (extensive diagnostics): Add control-flow piece to '}' in
loop body when generating 'Looping back to the head of the loop'
diagnostics.

llvm-svn: 71829
2009-05-15 01:50:15 +00:00
Anders Carlsson 19b8c4ce36 Instantiate return statements.
llvm-svn: 71825
2009-05-15 00:48:27 +00:00
Mike Stump 2c002929b2 Fixup debug information for the location information for __block
variables.  For this to work, the backend needs to handle more complex
forms for locations.

A typical utterance would be:

        %forwarding = getelementptr %0* %use_by_ref, i32 0, i32 1               ; <i8**> [#uses=1]
        %0 = load i8** %forwarding              ; <i8*> [#uses=1]
        %1 = bitcast i8* %0 to %0*              ; <%0*> [#uses=1]
        %x = getelementptr %0* %1, i32 0, i32 4         ; <i32*> [#uses=1]
        %2 = bitcast i32* %x to { }*            ; <{ }*> [#uses=1]
        call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*))

Presently when selection finds something it doesn't understand, it
just avoids generating any information, which is safe, just
incomplete.  Radar 6867696

llvm-svn: 71824
2009-05-15 00:29:54 +00:00
Anders Carlsson 03b0dd5913 Add NullStmt::Clone and use it
llvm-svn: 71823
2009-05-15 00:21:21 +00:00
Anders Carlsson f42de874b3 Instantiate goto and label statements. (Very useful, I know)
llvm-svn: 71822
2009-05-15 00:15:26 +00:00
Anders Carlsson ee209a6501 Add SemaTemplateInstantiateExpr.cpp to Xcode project.
llvm-svn: 71820
2009-05-15 00:10:12 +00:00
Douglas Gregor 923feac4e2 Implement template instantiation for DeclStmt
llvm-svn: 71818
2009-05-15 00:01:03 +00:00
Fariborz Jahanian 0c20bddc41 Don't warn if result/argument type of an implemented
method is a qualified id which conforms to the matching type
of its method declaration.

llvm-svn: 71817
2009-05-14 23:52:54 +00:00
Douglas Gregor 0555e5fbce Template instantiation for the NULL statement. Lame, I know
llvm-svn: 71816
2009-05-14 23:40:54 +00:00
Douglas Gregor b4850465b7 Introduce basic support for instantiating the definitions of member
functions of class templates. Only compound statements and expression
statements are currently implemented.

llvm-svn: 71814
2009-05-14 23:26:13 +00:00
Anders Carlsson 0a7c01ff2b Check that the function being overridden is virtual.
llvm-svn: 71802
2009-05-14 22:15:41 +00:00
Anders Carlsson e0dd1d57b3 Improvements to the FunctionDecl getters/setters.
llvm-svn: 71800
2009-05-14 21:46:00 +00:00
Douglas Gregor 372565211e Introduce a stack of instantiation scopes that are used to store the mapping from variable declarations that occur within templates to their instantiated counterparts
llvm-svn: 71799
2009-05-14 21:44:34 +00:00
Ted Kremenek f9fa3cb78a Fix <rdar://problem/6859457> [NSData dataWithBytesNoCopy] does not return a retained object.
llvm-svn: 71797
2009-05-14 21:29:16 +00:00
Anders Carlsson 0224c67400 Fix the same speling error in the test case (Duh).
llvm-svn: 71793
2009-05-14 21:20:16 +00:00
Douglas Gregor 24c332b140 Link FunctionDecls instantiated from the member functions of a class
template to the FunctionDecls from which they were instantiated. This
is a necessary first step to support instantiation of the definitions
of such functions, but by itself does essentially nothing.

llvm-svn: 71792
2009-05-14 21:06:31 +00:00
Anders Carlsson 339869e986 Fix a speling error.
llvm-svn: 71791
2009-05-14 21:03:44 +00:00
Fariborz Jahanian 3133a2f08c updated comments.
llvm-svn: 71790
2009-05-14 20:57:28 +00:00
Fariborz Jahanian 6607b21156 Adds recognition of sentinel attribute on block declarations.
llvm-svn: 71788
2009-05-14 20:53:39 +00:00
Anders Carlsson 8fb0b8a2cb Better diagnostics for covariance when checking overriding return types.
llvm-svn: 71786
2009-05-14 19:52:19 +00:00
Sebastian Redl 4d226cf45f When there are any member new operators, global versions aren't looked up at all.
llvm-svn: 71780
2009-05-14 18:11:41 +00:00
Fariborz Jahanian 4a528035fd Diagnose missing sentinel argument on a funciton call
with sentinel attribute.

llvm-svn: 71778
2009-05-14 18:00:00 +00:00
Daniel Dunbar 2daacd1f08 Avoid generating temp in source directory
llvm-svn: 71776
2009-05-14 17:00:11 +00:00
Daniel Dunbar 0a2171ccd5 Skip the asm prefix when storing the name in block info.
- Otherwise we emit internal names with embedded '\01' characters,
   which confuses some tools.

 - Ideally all the code which wants to get a "display name" for the
   given function should follow one code path, but this should be a
   monotonic improvement for now.

llvm-svn: 71774
2009-05-14 16:42:16 +00:00
Douglas Gregor d9034f0b89 In C++, warn when something previously declared as a "struct" is later
declared as a "class", or vice-versa. This warning is under the
control of -Wmismatched-tags, which is off by default.

llvm-svn: 71773
2009-05-14 16:41:31 +00:00
Douglas Gregor 8533490df9 Add forward declaration of Token. Thanks to Martin Doucha for pointing this out
llvm-svn: 71772
2009-05-14 15:47:53 +00:00
Mike Stump 31f099c8c2 Enhance debug information for block literals. Radar 6867696
llvm-svn: 71763
2009-05-14 02:03:51 +00:00
Daniel Dunbar 7911002bf9 We need to specify the "linkage name" to the subprogram now that we
emit the correct "display name". I suspect we need more work here, see
FIXME for example.

llvm-svn: 71761
2009-05-14 01:45:24 +00:00
Anders Carlsson f2a2e338ff Add return type checking for overriding virtual functions. We currently don't check covariance but that's next.
llvm-svn: 71759
2009-05-14 01:09:04 +00:00
Douglas Gregor 2ec748cd5a Implement explicit instantiations of member classes of class templates, e.g.,
template<typename T>
  struct X {
    struct Inner;
  };

  template struct X<int>::Inner;

This change is larger than it looks because it also fixes some
a problem with nested-name-specifiers and tags. We weren't requiring
the DeclContext associated with the scope specifier of a tag to be
complete. Therefore, when looking for something like "struct
X<int>::Inner", we weren't instantiating X<int>. 

This, naturally, uncovered a problem with member pointers, where we
were requiring the left-hand side of a member pointer access
expression (e.g., x->*) to be a complete type. However, this is wrong:
the semantics of this expression does not require a complete type (EDG
agrees).

Stuart vouched for me. Blame him.

llvm-svn: 71756
2009-05-14 00:28:11 +00:00
Fariborz Jahanian 9e87721d47 Look for and diagnose missing sentinel argument on message
dispatch arguments which have sentinel attribute.

llvm-svn: 71737
2009-05-13 23:20:50 +00:00
Daniel Dunbar 0beb7894c4 Make sure not to include the LLVM asm prefix in function names for
debug info.

llvm-svn: 71736
2009-05-13 23:08:57 +00:00
Daniel Dunbar ffe4e63b40 Note that clang follows the MSVC definition for #pragma pack.
llvm-svn: 71725
2009-05-13 21:40:49 +00:00
Daniel Dunbar 0aef72c697 Add a test case to showcase a difference in #pragma pack handling
compared to gcc. This is worrisome, but I believe we are doing the
"correct" thing, and if I recall correctly I previously verified this
versus MSVC.

llvm-svn: 71723
2009-05-13 21:34:08 +00:00
Anders Carlsson e39935527e Use an iterator type for found_decls_begin/found_decls_end.
llvm-svn: 71721
2009-05-13 21:22:06 +00:00
Anders Carlsson 49d216db15 Add a new, more advanced CheckDerivedToBaseConversion that takes custom diagnostic IDs.
llvm-svn: 71720
2009-05-13 21:11:42 +00:00
Ted Kremenek 3b204e4c2e Add some basic type checking for attributes ns_returns_retained and
cf_returns_retained. Currently this attribute can now be applied to any
Objective-C method or C function that returns a pointer or Objective-C object
type.

Modify the tablegen definition of diagnostic 'warn_attribute_wrong_decl_type' to
expect that the diagnostics infrastructure will add quotes around the attribute
name when appropriate. Alonq with this change, I modified the places where this
warning is issued to passed the attribute's IdentifierInfo* instead of having a
hard-coded C constant string.

llvm-svn: 71718
2009-05-13 21:07:32 +00:00
Ted Kremenek 2b77677322 Update checker build.
llvm-svn: 71716
2009-05-13 20:49:00 +00:00
Douglas Gregor bbbb02d463 Explicit instantiations of templates now instantiate the definitions
of class members (recursively). Only member classes are actually
instantiated; the instantiation logic for member functions and
variables are just stubs.

llvm-svn: 71713
2009-05-13 20:28:22 +00:00
Anders Carlsson 5879fbd933 Disable access control by default. It can be enabled with the -faccess-control option. When we have better support for it, we can enable it by default again.
llvm-svn: 71706
2009-05-13 19:49:53 +00:00
Ted Kremenek 4060be74d9 Add PostStmt::getStmtAs(). This unbreaks the build.
llvm-svn: 71701
2009-05-13 19:23:41 +00:00
Ted Kremenek bae777254a Enhance diagnostics value tracking logic for null dereferences and uninitialized values.
llvm-svn: 71700
2009-05-13 19:16:35 +00:00
Ted Kremenek a2d3093da7 Add ExplodedNode utility methods 'getLocationAs()' and 'getFirstPred()'
llvm-svn: 71699
2009-05-13 19:14:06 +00:00
Daniel Dunbar 8a35ef85d8 Driver: Emit an unsupported error on -iframework.
llvm-svn: 71698
2009-05-13 19:05:04 +00:00
Daniel Dunbar ffdb8439d7 ABI handling: Fix invalid assertion, it is possible for a valid
coercion to be specified which truncates padding bits. It would be
nice to still have the assert, but we don't have any API call for the
unpadding size of a type yet.

llvm-svn: 71695
2009-05-13 18:54:26 +00:00
Douglas Gregor f61eca93c0 Improve the semantic checking for explicit instantiations of
templates. In particular:
  - An explicit instantiation can follow an implicit instantiation (we
  were improperly diagnosing this as an error, previously).
  - In C++0x, an explicit instantiation that follows an explicit
  specialization of the same template specialization is ignored. In
  C++98, we just emit an extension warning.
  - In C++0x, an explicit instantiation must be in a namespace
  enclosing the original template. C++98 has no such requirement.

Also, fixed a longstanding FIXME regarding the integral type that is
used for the size of a constant array type when it is being instantiated.

llvm-svn: 71689
2009-05-13 18:28:20 +00:00
Ted Kremenek 5801f65a52 Fix crasher reported in PR 4209 caused by an invalid summary
generation when EvalObjCMessageExpr() did not resolve the
ObjCInterfaceDecl* for a receiver when the receiver's symbolic value
wasn't being explicitly tracked.

llvm-svn: 71685
2009-05-13 18:16:01 +00:00
Fariborz Jahanian 027b886a99 Some early declarations to support sentinel attribute on
message dispatches (and function calls later). No change in
functionality.

llvm-svn: 71683
2009-05-13 18:09:35 +00:00
Chris Lattner 939952c19c remove the obsolete -fprint-source-range-info option
llvm-svn: 71675
2009-05-13 17:08:18 +00:00
Fariborz Jahanian 1880136520 Removed 4-letter :) word in comment.
Used simple array for Selector build.

llvm-svn: 71674
2009-05-13 16:19:02 +00:00
Ted Kremenek 4554f9b134 Fix <rdar://problem/6880975> [format string] Assertion failed: (Arg < NumArgs && "Arg access out of range!").
For format string checking, only check the type of the format
specifier for non-vararg functions.

llvm-svn: 71672
2009-05-13 16:06:05 +00:00
Ted Kremenek 051a03d698 Fix crasher in CFRefCount.cpp reported by Nikita Zhuk due to recently added autorelease tracking.
llvm-svn: 71647
2009-05-13 07:12:33 +00:00
Chris Lattner ff96dd0301 Fix rdar://6880630 - # in _Pragma does not start a preprocessor directive.
llvm-svn: 71643
2009-05-13 06:10:29 +00:00
Chris Lattner c898a68998 convert test to use -verify
llvm-svn: 71642
2009-05-13 06:07:25 +00:00
Chris Lattner cfd0fadc75 rename test
llvm-svn: 71641
2009-05-13 06:07:04 +00:00
Chris Lattner b70f3de625 Fix rdar://6880951 by rejecting vectors of vectors.
It seems dubious to me that isIntegerType() returns true for
vectors of integers, but not complex integers.  This should 
probably be rethought, I'll file a bugzilla.

llvm-svn: 71640
2009-05-13 05:13:44 +00:00
Chris Lattner df24298b40 reject use of the GNU _Decimal32 extension with a diagnostic, not an abort.
rdar://6880104

llvm-svn: 71639
2009-05-13 05:02:08 +00:00
Chris Lattner 5868c03191 eli correctly points out that this code is dead, just rip it out for
now until someone does it right

llvm-svn: 71638
2009-05-13 04:52:12 +00:00
Chris Lattner afde259240 implement __sync_synchronize and __sync_lock_release,
rdar://6880573

llvm-svn: 71637
2009-05-13 04:46:13 +00:00
Chris Lattner 94578cba76 add support for __sync_nand_and_fetch and __sync_fetch_and_nand,
rdar://6880573

llvm-svn: 71636
2009-05-13 04:37:52 +00:00
Chris Lattner e2df3f9fe5 Fix rdar://6880874 - [sema] crash on array types with different index sizes
llvm-svn: 71634
2009-05-13 04:12:56 +00:00
Chris Lattner 851eb927d7 Fix rdar://6881069, a crash on a form of vector_size that we
don't support.  While it would be nice to support this eventually,
this form is not common at all (just seen in gcc testsuite) and
it might be better to model vector_size as a type attribute anyway.
For now just emit a nice error on it.

llvm-svn: 71633
2009-05-13 04:00:12 +00:00
Chris Lattner 46813bbfa2 Fix rdar://6880259 - invalid function name in block call (__NSConcreteGlobalBlock2)
by using the appropriate CGM interface instead of directly creating a global.

llvm-svn: 71617
2009-05-13 02:50:56 +00:00
Chris Lattner f160b5f9e1 When we expect two arguments but have zero, make sure to add
two empty arguments.  Also, add an assert so that this bug
manifests as an assertion failure, not a valgrind problem.

This fixes rdar://6880648 - [cpp] crash in ArgNeedsPreexpansion

llvm-svn: 71616
2009-05-13 00:55:26 +00:00
Fariborz Jahanian d9d6e6e039 Changed wording of warning when attribute is on
method definition.

llvm-svn: 71615
2009-05-13 00:47:33 +00:00
Douglas Gregor a1f4997368 Semantic analysis for explicit instantiation of class templates. We
still aren't instantiating the definitions of class template members,
and core issues 275 and 259 will both affect the checking that we do
for explicit instantiations (but are not yet implemented).

llvm-svn: 71613
2009-05-13 00:25:59 +00:00
Daniel Dunbar 98d7164ab0 Tweak wording
llvm-svn: 71611
2009-05-13 00:23:53 +00:00
Douglas Gregor 1b57ff32a8 Implement parsing for explicit instantiations of class templates, e.g.,
template class X<int>;

This also cleans up the propagation of template information through
declaration parsing, which is used to improve some diagnostics.

llvm-svn: 71608
2009-05-12 23:25:50 +00:00
Daniel Dunbar e83b560e06 Note a few more unsupported language extensions.
llvm-svn: 71607
2009-05-12 23:12:07 +00:00
Ted Kremenek 14fbc56a09 Update checker build.
llvm-svn: 71605
2009-05-12 22:44:02 +00:00
Chris Lattner d98e7cf7c1 improve the diagnostic for uses of the GCC "global variable in a register" extension.
This implements rdar://6880449 - improve diagnostic for usage of "global register variable" GCC extension

llvm-svn: 71599
2009-05-12 21:44:00 +00:00
Douglas Gregor 36312bb5ee Parser::ParseDeclarationOrFunctionDefinition no longer needs to accept
template parameters.

llvm-svn: 71598
2009-05-12 21:43:46 +00:00
Fariborz Jahanian 2bd617c46c Method attributes may only be specified on method
declarations.

llvm-svn: 71597
2009-05-12 21:36:23 +00:00
Douglas Gregor 2399628cea Refactor the parsing of declarations so that template declarations can
parse just a single declaration and provide a reasonable diagnostic
when the "only one declarator per template declaration" rule is
violated. This eliminates some ugly, ugly hackery where we used to
require thatn the layout of a DeclGroup of a single element be the
same as the layout of a single declaration.

llvm-svn: 71596
2009-05-12 21:31:51 +00:00
Chris Lattner e541ea3a61 implement l-value codegen of comma expr
llvm-svn: 71595
2009-05-12 21:28:12 +00:00
Chris Lattner e0be0dfced push GlobalDecl through enough of the CodeGenModule interfaces
to allow us to support generation of deferred ctors/dtors.
It looks like codegen isn't emitting a call to the dtor in 
member-functions.cpp:test2, but when it does, its body should
get emitted.

llvm-svn: 71594
2009-05-12 21:21:08 +00:00
Chris Lattner d035ebda2f add an initial stab at emitting deferred c++ inline functions. This handles static
functions and methods declared inline, but not ctors/dtors or methods not declared
inline (apparently my previous patch wasn't good enough).

llvm-svn: 71591
2009-05-12 21:02:27 +00:00
Chris Lattner eb7466d24a cleanups, no functionality change.
llvm-svn: 71590
2009-05-12 20:58:15 +00:00
Chris Lattner da7a0977d6 Method who have definitions in structs/classes are semantically inline.
Per the FIXME, it might be interesting to track whether the inline keyword
was also used on the method, but for now we don't do this.  Testcase pending.

llvm-svn: 71589
2009-05-12 20:55:07 +00:00
Chris Lattner bea5b622be static methods don't get this pointers.
llvm-svn: 71586
2009-05-12 20:27:19 +00:00
Chris Lattner e7834115eb revert my previous patch, I committed the wrong file.
llvm-svn: 71585
2009-05-12 20:26:52 +00:00
Douglas Gregor 2779733d0e Diagnostic wording fix, from Anders Johnsen
llvm-svn: 71584
2009-05-12 20:24:52 +00:00
Chris Lattner cd74ffa3eb static methods don't get this pointers.
llvm-svn: 71583
2009-05-12 20:21:39 +00:00
Ted Kremenek 1272f706ca Fix: <rdar://problem/6320065> false positive - init method returns an object owned by caller
Now 'init' methods are treated by the retain/release checker as
claiming their receiver and allocating a new object.

llvm-svn: 71579
2009-05-12 20:06:54 +00:00
Fariborz Jahanian e4128642a7 Fixed typos, used DenseSet for keeping track of
selectors which need use Nonfrgile API for
message dispatch.

llvm-svn: 71578
2009-05-12 20:06:41 +00:00
Douglas Gregor 9e0d21a444 Align the N/A in the C++ status table, from Anders Johnsen
llvm-svn: 71576
2009-05-12 18:36:58 +00:00
Chris Lattner b61448d490 accept "#pragma clang foo" where we accept "#pragma GCC foo".
llvm-svn: 71572
2009-05-12 18:21:11 +00:00
Fariborz Jahanian 0f44d81a4c Patch to implement ivar synthesis of properties declared in protocols
only and used in class imllementations (objc2 Nonfragile ABI specific).

llvm-svn: 71571
2009-05-12 18:14:29 +00:00
Ted Kremenek 3c2775f0b0 Make scan-build process of --use-cc and --html-title more robust.
llvm-svn: 71567
2009-05-12 18:04:43 +00:00
Douglas Gregor 5a4d12afbf Fill in more C++ status. We're now using the check mark to mean,
"complete, and we have tests for every paragraph".

llvm-svn: 71564
2009-05-12 17:55:28 +00:00
Daniel Dunbar bbfd054746 Darwin x86-32 ABI: Now that structure passing is farther along, we
don't need special treatment for unions.

llvm-svn: 71559
2009-05-12 17:00:20 +00:00
Daniel Dunbar 203e2e8dd8 x86-64 ABI: clang incorrectly passes union { long double, float } in
register.
 - Merge algorithm was returning MEMORY as it should.

llvm-svn: 71556
2009-05-12 15:22:40 +00:00
Zhongxing Xu 08a2ede018 Add logic for invalidating array region to CFRefCount.cpp. When invalidating
array region, set its default value to conjured symbol. When retrieving its
element, create new region value symbol for the element.

Also fix some 80 columns violations.

llvm-svn: 71548
2009-05-12 10:10:00 +00:00
Ted Kremenek 95d181936a Fix <rdar://problem/6877235> Classes typedef-ed to CF objects should get the same treatment as CF objects
This was accomplished by having	'isTypeRef' recursively walk the typedef stack.

llvm-svn: 71538
2009-05-12 04:53:03 +00:00
Douglas Gregor 45fe0364aa Make precompiled headers work with -E. When we're only preprocessing
(with -E), we turn the PCH include into an implicit include of the
file from which the PCH file was generated.

llvm-svn: 71534
2009-05-12 01:31:05 +00:00
Chris Lattner 32efff659c wrap up a version of the man page that is minimally helpful, but somewhat complete.
llvm-svn: 71524
2009-05-12 00:47:40 +00:00
Ted Kremenek df5a6b6070 Update checker build.
llvm-svn: 71523
2009-05-12 00:45:33 +00:00
Chris Lattner 66c64f9ba4 add some more content.
llvm-svn: 71518
2009-05-12 00:01:32 +00:00
Douglas Gregor d002c7bc58 Encapsulate template arguments lists in a new class,
TemplateArgumentList. This avoids the need to pass around
pointer/length pairs of template arguments lists, and will eventually
make it easier to introduce member templates and variadic templates.

llvm-svn: 71517
2009-05-11 23:53:27 +00:00
Ted Kremenek 5fb7847fbf BugReport::getEndPath() - Only add a Stmt's range to the constructed PathDiagnosticEventPiece if the BugReport contained no explicit ranges.
llvm-svn: 71516
2009-05-11 23:50:59 +00:00
Anders Carlsson bd7d11f770 Factor code that's common to EmitCXXMemberCallExpr and EmitCXXConstructorCall out into a EmitCXXMemberCall function.
llvm-svn: 71514
2009-05-11 23:37:08 +00:00
Ted Kremenek 25421bb8f6 Use Text::ParseWords to make 'clang -###' parsing more robust.
llvm-svn: 71504
2009-05-11 23:29:51 +00:00
Daniel Dunbar a3bb6f2e5b Tweak this non-default test so it still works w/ x86 feature support.
llvm-svn: 71494
2009-05-11 23:11:21 +00:00
Daniel Dunbar e90fa18d6c Test for x86 target features, I forgot to commit this.
llvm-svn: 71492
2009-05-11 23:06:15 +00:00
Daniel Dunbar 097353cbb5 Darwin x86-32: Multi-dimensional arrays were not handled correctly,
spotted by Eli!

llvm-svn: 71490
2009-05-11 23:01:34 +00:00
Anders Carlsson 3881170898 Friend declarations are only valid inside class definitions.
llvm-svn: 71489
2009-05-11 22:55:49 +00:00
Ted Kremenek 97f75f8bda When stripping element regions for invalidating region values, treat FieldRegions and ObjCIvarRegions as "base" regions in addition to VarRegions.
llvm-svn: 71488
2009-05-11 22:55:17 +00:00
Chris Lattner e3c3f40404 pull a bunch of options out of clang-cc.cpp. This doesn't include
options that the driver swizzles.

llvm-svn: 71487
2009-05-11 22:45:37 +00:00
Anders Carlsson 076fc36419 Fix test case by always setting the type spec type, even for friend decls.
llvm-svn: 71486
2009-05-11 22:42:30 +00:00
Daniel Dunbar e92449e4cc Make cleanup-stack.c test stronger, and work in release-asserts mode.
llvm-svn: 71484
2009-05-11 22:30:29 +00:00
Anders Carlsson f83c9faa2f Add an ActOnFriendDecl and call it for friend class decls.
llvm-svn: 71482
2009-05-11 22:27:47 +00:00
Anders Carlsson 22e3784c79 For friend class decls, always use TK_Reference so we'll try to look up existing class decls first.
llvm-svn: 71481
2009-05-11 22:25:03 +00:00
Ted Kremenek 2ee73b86c0 EdgeBuilder: DeclStmts and BinaryOperators are not the enclosing location context when they are used as initialization code for loops.
llvm-svn: 71480
2009-05-11 22:19:32 +00:00
Ted Kremenek c0b879b4a7 EdgeBuilder::cleanUpLocation() should used the PathDiagnosticLocation constructor for a single point, not a range.
llvm-svn: 71477
2009-05-11 21:42:34 +00:00
Ted Kremenek dc99ec4ebd ccc-analyzer should only analyze C and Objective-C files.
llvm-svn: 71474
2009-05-11 21:08:34 +00:00
Douglas Gregor c9f9b86732 Implement the notions of the "current instantiation" and "unknown
specialization" within a C++ template, and permit name lookup into the
current instantiation. For example, given:

  template<typename T, typename U>
  struct X {
    typedef T type;

    X* x1;  // current instantiation
    X<T, U> *x2; // current instantiation
    X<U, T> *x3; // not current instantiation
    ::X<type, U> *x4; // current instantiation
    X<typename X<type, U>::type, U>: *x5; // current instantiation
  };

llvm-svn: 71471
2009-05-11 19:58:34 +00:00
Ted Kremenek c14b594b14 BugReporter (extensive diagnostics): Add EdgeBuilder::cleanUpLocation for canonicalization locations and use this in both popLocation and rawAddEdge.
llvm-svn: 71470
2009-05-11 19:50:47 +00:00
Ted Kremenek d4dacb05cc Add ParentMap:getParentIgnoreParens().
llvm-svn: 71469
2009-05-11 19:49:27 +00:00
Fariborz Jahanian 5d5ed2d800 Patch to allow Nonfragile ABI to use 32-bit style legacy
message dispage API for all but a few messages. This is 
a runtime performance improvement and there is not meant
to be a functional change.

llvm-svn: 71467
2009-05-11 19:25:47 +00:00
Ted Kremenek 3a4360c728 Update checker build.
llvm-svn: 71463
2009-05-11 19:02:11 +00:00
Daniel Dunbar 2ce6b3f91c Darwin x86_32: Treat records with unnamed bit-fields as "empty".
llvm-svn: 71461
2009-05-11 18:58:49 +00:00
Ted Kremenek d0e3ab2196 Fix regression reported in <rdar://problem/6866843>. The analyzer should extend the lifetime of an object stored to a container.
llvm-svn: 71452
2009-05-11 18:30:24 +00:00
Chris Lattner 9fea944f26 More improvements for GNU runtime objc EH, patch by David Chisnall!
llvm-svn: 71451
2009-05-11 18:16:28 +00:00
Douglas Gregor ad1a1c3982 Move terminal-width computation over to llvm::sys. Update to LLVM
r71448 required. Fixes PR 4148 and PR 4183.

llvm-svn: 71450
2009-05-11 18:06:49 +00:00
Ted Kremenek 7e7ed527dd Add test case for <rdar://problem/6257780>.
llvm-svn: 71444
2009-05-11 17:45:06 +00:00
Douglas Gregor bdccf64f4a Add a test for canonicalization of template arguments
llvm-svn: 71436
2009-05-11 16:52:38 +00:00
Ted Kremenek f16992866a Update checker build.
llvm-svn: 71435
2009-05-11 16:31:31 +00:00
Ted Kremenek dc7853cd98 Fix a bug found by Thomas Clement where 'return [[[NSString alloc] init] autorelease]' would emit a false 'too many overreleases' error.
llvm-svn: 71432
2009-05-11 15:26:06 +00:00
Zhongxing Xu 52091db11f TypedRegion is a too general assumption. Usually we only want to invalidate
the VarRegion as a super region of an ElementRegion.

llvm-svn: 71431
2009-05-11 14:28:14 +00:00
Zhongxing Xu c012656266 When retrieving an ElementRegion, if its super region is a StringRegion,
retrieve the string value.

llvm-svn: 71430
2009-05-11 14:23:36 +00:00
Zhongxing Xu bf938d3160 Fix a bug that leads to infinite loop. Set the correct element type to
ElementRegion.

llvm-svn: 71428
2009-05-11 12:48:56 +00:00
Douglas Gregor 862d28e59c With the introduction of nullptr, a template argument that refers to a declaration can now be NULL. Use cast_or_null appropriately
llvm-svn: 71412
2009-05-10 23:27:08 +00:00
Douglas Gregor 5e4e50c280 The canonical declaration of a NULL declaration is NULL
llvm-svn: 71409
2009-05-10 22:59:12 +00:00
Douglas Gregor e362cea568 Implement the semantics of the injected-class-name within a class
template. The injected-class-name is either a type or a template,
depending on whether a '<' follows it. As a type, the
injected-class-name's template argument list contains its template
parameters in declaration order.

As part of this, add logic for canonicalizing declarations, and be
sure to canonicalize declarations used in template names and template
arguments. 

A TagType is dependent if the declaration it references is dependent.

I'm not happy about the rather complicated protocol needed to use
ASTContext::getTemplateSpecializationType.

llvm-svn: 71408
2009-05-10 22:57:19 +00:00
Sebastian Redl 9257b234a5 Update minor points in C++ status table.
llvm-svn: 71406
2009-05-10 20:06:11 +00:00
Sebastian Redl 576fd424df Implement C++0x nullptr.
llvm-svn: 71405
2009-05-10 18:38:11 +00:00
Ted Kremenek 9a627e60cd Update checker build.
llvm-svn: 71404
2009-05-10 17:41:29 +00:00
Ted Kremenek 1f8e4346fa Add special warning about returning a retained object where a GC'ed object is expected.
llvm-svn: 71397
2009-05-10 16:52:15 +00:00
Ted Kremenek dee56e37fc retain/release checker: Flag a warning for non-owned objects returned
where an owned one is expected.  Also add preliminary checking for
returning a positive retain count object in GC mode where an owned GC
object is expected.

llvm-svn: 71388
2009-05-10 06:25:57 +00:00
Ted Kremenek 9dc1bed4a6 Update checker build.
llvm-svn: 71387
2009-05-10 05:54:23 +00:00
Ted Kremenek 3978f7972d analyzer:
- Improve -autorelease diagnostics.
- Improve VLA diagnostics.
- Use "short description" for bug when outputting to TextDiagnostics

llvm-svn: 71383
2009-05-10 05:11:21 +00:00
Ted Kremenek 1e0d6a5957 Update checker build.
llvm-svn: 71375
2009-05-10 02:22:16 +00:00
Ted Kremenek 1f991f09df Add total hack to get scan-build working again. ccc-analyzer calls
'clang -###' to get the appropriate arguments to pass to clang-cc.
This isn't a permanent solution.

llvm-svn: 71364
2009-05-09 19:19:28 +00:00
Chris Lattner da38fda583 force a target triple so that the right greppable output happens.
llvm-svn: 71361
2009-05-09 17:36:58 +00:00
Zhongxing Xu c9c3dab491 When casting VarRegion, if the var type is aggregate type and the cast-to
pointee type is scalar type, create element region regardless with the sizes
of types.

llvm-svn: 71360
2009-05-09 15:34:29 +00:00
Zhongxing Xu 4131114d99 Remove the rest TypedViewRegion processing code. There should be no
TypedViewRegion usage in region store.

llvm-svn: 71359
2009-05-09 15:23:42 +00:00
Zhongxing Xu d6daef9165 When evaluating pointer arithmetic, if the base location is a symbolic region,
convert it to the first element region.
Also do not assume the array region is typed.

llvm-svn: 71358
2009-05-09 15:18:12 +00:00
Zhongxing Xu b18d7cab0c Do not create a TypedViewRegion when the base struct region is a symbolic
region. In the future we may set the cast-to type as the same time. But for
now, we simply leave it as it is.

llvm-svn: 71357
2009-05-09 13:36:16 +00:00
Zhongxing Xu 4bc5a4c3bd add comments to test case.
llvm-svn: 71356
2009-05-09 13:27:17 +00:00
Zhongxing Xu 7c3826484e Do not layer a TypedViewRegion when casting symbolic or alloca regions.
Modify getLValueElement accordingly. Now we don't require base region 
to be a typed region. Do not create TypedViewRegion when base region is 
symbolic or alloca region. We can do so because each element region has 
its type information.

llvm-svn: 71355
2009-05-09 13:20:07 +00:00
Zhongxing Xu e3e94bbf19 Remove the case for casting to compatible type in
RegionStoreManager::CastRegion(). This case should be subsumed by others.

llvm-svn: 71353
2009-05-09 10:03:08 +00:00
Duncan Sands c76fe8b611 Correct for renaming PaddedSize -> AllocSize in
LLVM.

llvm-svn: 71350
2009-05-09 07:08:47 +00:00
Ted Kremenek 6631d7c4be Roll back to checker build 0.195.
llvm-svn: 71348
2009-05-09 07:05:44 +00:00
Zhongxing Xu 91e2ab496f Rename:
SymbolRegionRValue => SymbolRegionValue
  SymExpr::RegionRValue => SymExpr::RegionValueKind

llvm-svn: 71322
2009-05-09 04:08:27 +00:00
Zhongxing Xu 34d04b3ca9 As discussed with Ted, rename TypedRegion::getObjectType() to
TypedRegion::getValueType().

llvm-svn: 71321
2009-05-09 03:57:34 +00:00
Ted Kremenek d73cfc734b Add back test cases for ns_returns_retained and cf_returns_retained.
llvm-svn: 71312
2009-05-09 03:10:32 +00:00
Ted Kremenek 669604cded Add back attribute string lookup for 'ns_returns_retained' and
'cf_returns_retained'.

llvm-svn: 71311
2009-05-09 03:08:29 +00:00
Ted Kremenek c2de72776c Add back analyzer support for ns_returns_retained and cf_returns_retained.
llvm-svn: 71309
2009-05-09 02:58:13 +00:00
Ted Kremenek 9ecdfaf66d Add back Parse/Sema support for attributes cf_returns_retained and
ns_returns_retained, but do not include the other ownership attributes
we previously had.

llvm-svn: 71308
2009-05-09 02:44:38 +00:00
Ted Kremenek 2d0ff62a0d It lives! The retain/release checker now tracks objects that are sent
'autorelease'.

llvm-svn: 71307
2009-05-09 01:50:57 +00:00
Ted Kremenek 8326c2fdfc Fix lurking bug in one of the versions of
GRStmtNodeBuilder::generateNode() where the HasGeneratedNode flag
wouldn't properly be set.

llvm-svn: 71306
2009-05-09 01:37:12 +00:00
Zhongxing Xu 8038f7b30f rename: MemRegion:
RValueType => ObjectType
 LValueType => LocationType

No functionality change.

llvm-svn: 71304
2009-05-09 00:50:33 +00:00
Ted Kremenek 9ec08aa3f7 More hacking on autorelease errors. We now can emit basic errors (disabled for
now until ready).

llvm-svn: 71303
2009-05-09 00:44:07 +00:00
Ted Kremenek d35272f96b Put most of the boilerplate logic in place for reporting autorelease errors.
llvm-svn: 71301
2009-05-09 00:10:05 +00:00
Fariborz Jahanian 5276014db2 We want to diagnose sending message to a forward class
and we also want to tell which message is actually 
being sent.

llvm-svn: 71296
2009-05-08 23:45:49 +00:00
Daniel Dunbar 793cc3e0c3 ABITest: Improve test driver marginally, to allow running a specific
test index.

llvm-svn: 71295
2009-05-08 23:40:45 +00:00
Ted Kremenek 8c8fb488e6 retain/release checker: Add stub for HandleAutoreleaseCounts.
llvm-svn: 71290
2009-05-08 23:32:51 +00:00
Zhongxing Xu ca143e73ea Fix PR4182.
llvm-svn: 71288
2009-05-08 23:28:07 +00:00
Ted Kremenek 884a8996c5 retain/release checker: Refactor error-reporting code in EvalDeadSymbols and
EvalEndPath. This sets the stage for handling autorelease counts.

llvm-svn: 71283
2009-05-08 23:09:42 +00:00
Ted Kremenek c218c84a80 Make BlockEntrace program points taggable.
llvm-svn: 71280
2009-05-08 23:08:34 +00:00
Ted Kremenek c56062d72e Fix typo in method name.
llvm-svn: 71279
2009-05-08 23:07:51 +00:00
Fariborz Jahanian 1bd844da80 Warn if forward class is used as a receiver.
llvm-svn: 71278
2009-05-08 23:02:36 +00:00
Daniel Dunbar 3a53b857d0 ABITest: Move more of the common Makefile bits into the common
Makefile.

llvm-svn: 71274
2009-05-08 22:49:52 +00:00
Daniel Dunbar 811e62c8c1 ABITest: Fix a bug in generating test values for structures w/ no
non-padding fields.

llvm-svn: 71273
2009-05-08 22:48:39 +00:00
Daniel Dunbar b997f3bcc3 x86_64 ABI: Ignore padding bit-fields during classification.
- {return-types,single-args}-{32,64} pass the first 1k ABI tests with
   bit-fields enabled.

llvm-svn: 71272
2009-05-08 22:26:44 +00:00
Daniel Dunbar 4752783057 Darwin x86_32: When coercing a "single element" structure, make sure
to use a wide enough type. This might be wider than the "single
element"'s type in the presence of padding bit-fields.
 - Darwin x86_32 now passes the first 1k ABI tests with bit-field
   generation enabled.

llvm-svn: 71270
2009-05-08 21:30:11 +00:00
Fariborz Jahanian 3e68a1facc Fixes a bug in my last patch. Order of types reversed.
llvm-svn: 71267
2009-05-08 21:10:00 +00:00
Daniel Dunbar fdda3501a0 Darwin x86_32: Ignore padding bit-fields when looking for "single
element" structures.

llvm-svn: 71266
2009-05-08 21:04:47 +00:00
Daniel Dunbar 4861346c44 Darwin x86_32: Improve bit-field handling for returning records.
- This turns out to be a no-op now that most of the handling for
   everything else is in place.

llvm-svn: 71261
2009-05-08 20:55:49 +00:00
Daniel Dunbar 85f4028f2e Darwin x86_32: Ignore arrays of empty structures inside records.
- This eliminates 5/1000 failures on return-types-32, on the current
   ABITest config.

llvm-svn: 71250
2009-05-08 20:21:04 +00:00
Fariborz Jahanian fe9e3940eb Refactoring of my last patch.
llvm-svn: 71248
2009-05-08 20:20:55 +00:00
Daniel Dunbar 51c4bc320e ABITest: Move default set of test args into common makefile.
Also, tweak default list of bit-fields to try.

llvm-svn: 71246
2009-05-08 20:10:52 +00:00