Benjamin Kramer
6b289a9cf6
Update CMake file.
...
llvm-svn: 85652
2009-10-31 12:15:23 +00:00
Zhongxing Xu
b1c24724dd
Move CheckDivZero into its own files.
...
llvm-svn: 85651
2009-10-31 10:02:37 +00:00
Zhongxing Xu
358ced08d0
Move UndefDerefChecker into its own file.
...
llvm-svn: 85645
2009-10-31 08:44:33 +00:00
Zhongxing Xu
5f5c954329
fix 80-col.
...
llvm-svn: 85642
2009-10-31 03:36:08 +00:00
Douglas Gregor
326b2fa03e
Fix a crazy canonical-types bug because canonicalizing a
...
dependently-sized array type with a given expression might end up
returning a non-canonical type; see through that non-canonical type to
the underlying canonical type. Yes, I have a test case; no, I can't
reduce it to the point where it's worth checking in :(
llvm-svn: 85633
2009-10-30 22:56:57 +00:00
Douglas Gregor
62b885d43c
When looking for a copy-assignment operator to determine the cv-qualifiers on its argument type, ignore assignment operator templates
...
llvm-svn: 85629
2009-10-30 22:48:49 +00:00
Douglas Gregor
bb3b46eb74
When a friend is declared in a dependent context, don't even try to
...
match it up with a declaration in the outer scope.
llvm-svn: 85628
2009-10-30 22:42:42 +00:00
Douglas Gregor
1d0015f8e1
Improved fix for PR3844, which recovers better for class template
...
partial specializations and explicit instantiations of non-templates.
llvm-svn: 85620
2009-10-30 22:09:44 +00:00
Ted Kremenek
5c2040b182
Tighten computation of ExprVal using ?: expression. No functionality change.
...
llvm-svn: 85618
2009-10-30 22:01:29 +00:00
Douglas Gregor
916462b2f7
Improve diagnostics when parsing something like
...
template<> struct foo<int> { ... };
where "foo" does not refer to a template. Fixes PR3844.
llvm-svn: 85616
2009-10-30 21:46:58 +00:00
Douglas Gregor
412e8bc56d
Instantiate class template friends better; fixes PR5332.
...
llvm-svn: 85612
2009-10-30 21:07:27 +00:00
Daniel Dunbar
624c21b029
Change the driver to do the Darwin triple mangling itself instead of forwarding
...
-mmacosx-version-min and -miphoneos-version-min to clang-cc.
llvm-svn: 85600
2009-10-30 18:12:20 +00:00
Ted Kremenek
6f2a705a24
Make checkers run in deterministic order.
...
llvm-svn: 85597
2009-10-30 17:47:32 +00:00
Ted Kremenek
89f5c189db
Move NullDerefChecker.h instead a 'Checkers' subdirectory.
...
llvm-svn: 85596
2009-10-30 17:28:40 +00:00
Ted Kremenek
f613e89617
Move all logic for the null dereference checker from GRExprEngineInternalChecks.cpp to a separate .cpp file.
...
llvm-svn: 85595
2009-10-30 17:24:47 +00:00
Douglas Gregor
f329c7c3c0
Include macros in code-completion results
...
llvm-svn: 85594
2009-10-30 16:50:04 +00:00
John Thompson
b535352681
Re-arranged some internal functions for coming __has_include changes.
...
llvm-svn: 85589
2009-10-30 13:49:06 +00:00
Benjamin Kramer
305f9f8fed
Add C++ include paths for Exherbo. Patch by Daniel Mierswa!
...
llvm-svn: 85588
2009-10-30 12:57:13 +00:00
Zhongxing Xu
b9eda67380
Fix PR5316: make assignment expressions can be visited as lvalue. Then we
...
can get the correct base lvalue.
Revert r85578.
llvm-svn: 85579
2009-10-30 07:19:39 +00:00
Ted Kremenek
e96a30a531
Handle loading of field values from LazyCompoundVals in GRExprEngine::VisitMemberExpr().
...
This fixes the crash reported in PR 5316.
llvm-svn: 85578
2009-10-30 05:48:30 +00:00
Chris Lattner
252d36e74c
warn about returning the address of a label.
...
llvm-svn: 85576
2009-10-30 04:01:58 +00:00
Anders Carlsson
32e1b1c169
Get throws limping along, still a bunch of FIXMEs. Too bad we don't support catching anything yet :)
...
llvm-svn: 85574
2009-10-30 02:27:02 +00:00
Anders Carlsson
958c9f8524
Fix thinko, mangleCXXRtti should obviously take a QualType!
...
llvm-svn: 85565
2009-10-30 01:52:02 +00:00
Anders Carlsson
4b08db7a62
Add CGException.cpp, to be used for exception related code generation.
...
llvm-svn: 85560
2009-10-30 01:42:31 +00:00
Anders Carlsson
430046321b
mangleCXXRtti obviously needs to take a type, what was I thinking...
...
llvm-svn: 85555
2009-10-30 01:26:12 +00:00
Fariborz Jahanian
6c5a8e2555
This patch computes composite type of two objective-c expressions
...
used in a conditional expression by finding the most-derived common
super class of the two and qualifies the resulting type by the
intersection of the protocl qualifier list of the two objective-c
pointer types. ( this is continuation of radar 7334235).
llvm-svn: 85554
2009-10-30 01:13:23 +00:00
Anders Carlsson
3f0db2beb1
Add a CK_DerivedToBaseMemberPointer cast kind and use it in Sema (Still no codegen).
...
llvm-svn: 85552
2009-10-30 00:46:35 +00:00
John McCall
41b215eef6
Include pointee type information in the diagnostic for creating bad pointers or
...
arrays.
llvm-svn: 85550
2009-10-30 00:37:20 +00:00
John McCall
70dd5f6574
Report accurate source-location information when rebuilding types during
...
template instantiation.
llvm-svn: 85545
2009-10-30 00:06:24 +00:00
Mike Stump
f3eb5ec2c0
Fix one more bug with __builtin_object_size.
...
llvm-svn: 85538
2009-10-29 23:34:20 +00:00
Douglas Gregor
e6fb91f2cb
We may need to instantiate a class template specialization as part of a derived-to-base pointer case
...
llvm-svn: 85532
2009-10-29 23:08:22 +00:00
Douglas Gregor
07cc4ac606
Slightly improve source-location information during template instantiation
...
llvm-svn: 85529
2009-10-29 22:21:39 +00:00
Steve Naroff
f406f4d99b
- Add/tweak some comments.
...
- change ObjCCategoryImplDecl::getCategoryClass() to getCategoryDecl().
No functionality change.
llvm-svn: 85528
2009-10-29 21:11:04 +00:00
Mike Stump
fa50290b49
Fix some issues Daniel pointed out.
...
llvm-svn: 85526
2009-10-29 20:48:09 +00:00
Sebastian Redl
adba46edc2
Properly instantiate usage of overloaded operator []. Fixes PR5345.
...
llvm-svn: 85524
2009-10-29 20:17:01 +00:00
John McCall
0d07eb32de
A few TemplateArgumentLoc clean-ups. Try to remember the Expr for a declaration.
...
Provide an API for getting the SourceRange of a TAL and use it judiciously.
llvm-svn: 85520
2009-10-29 18:45:58 +00:00
Douglas Gregor
ba91b89711
Yet more instantiation-location information. Fixes PR5336.
...
llvm-svn: 85516
2009-10-29 17:56:10 +00:00
Fariborz Jahanian
c9076fecdf
Patch for destruction of array of objects on block exit.
...
llvm-svn: 85512
2009-10-29 16:22:54 +00:00
Anders Carlsson
561f793890
Make sure to call CompleteConstructorCall for bases and members that are initialized implicitly in constructors so that default arguments etc are set correctly. Fixes PR5283.
...
llvm-svn: 85510
2009-10-29 15:46:07 +00:00
Nuno Lopes
09bd8656c3
make clang emit undefs for padding of structs and unions instead of zeros. this enables constant compaction optimizations.
...
llvm-svn: 85504
2009-10-29 11:27:06 +00:00
John McCall
0ad166672f
Track source information for template arguments and template specialization
...
types. Preserve it through template instantiation. Preserve it through PCH,
although TSTs themselves aren't serializable, so that's pretty much meaningless.
llvm-svn: 85500
2009-10-29 08:12:44 +00:00
John McCall
588d2d585d
Extract TemplateArgument into a new header just for common template
...
classes. Move its implementation into a new module.
This will seem marginally more justified in a bit.
llvm-svn: 85499
2009-10-29 07:48:15 +00:00
Zhongxing Xu
aa4121d062
Add an assertion to ensure NullDerefChecker exists.
...
llvm-svn: 85497
2009-10-29 05:56:54 +00:00
Ted Kremenek
1dbdbcc04c
Fix accidental use of CheckSVal instead of CheckLocation, and add a
...
small test case to show we handle dereferences of undefined values.
llvm-svn: 85492
2009-10-29 05:33:39 +00:00
Douglas Gregor
98261735b4
StringSwitch-ify attribute name mapping.
...
llvm-svn: 85491
2009-10-29 05:26:58 +00:00
Ted Kremenek
1f0a56e4c9
Fix an insidious bug in RegionStore::RemoveDeadBindings() pointed out
...
by Zhongxing Xu. RemoveDeadBindings() would falsely prune
SymbolicRegions from the store that wrapped derived symbols whose
liveness could only be determined after scanning the store.
llvm-svn: 85484
2009-10-29 05:14:17 +00:00
Chris Lattner
d0952749f7
simplify intmax setup, patch by Ken Dyck!
...
llvm-svn: 85481
2009-10-29 04:54:24 +00:00
Daniel Dunbar
1a8a2e8e97
Remove some obsolete or unnecessary FIXMEs.
...
llvm-svn: 85475
2009-10-29 02:39:57 +00:00
Daniel Dunbar
945577ce93
PR5328: Allow duplicatic -pedantic (and -pedantic-errors) options.
...
- clang-cc doesn't care about their relative order with other -W options.
llvm-svn: 85473
2009-10-29 02:24:45 +00:00
Daniel Dunbar
b0b18615e2
Kill off MakeFormattedString helper function.
...
llvm-svn: 85472
2009-10-29 02:24:37 +00:00