Douglas Gregor
a121b75d9d
Use ParseUnqualifiedId when parsing id-expressions. This eliminates
...
yet another copy of the unqualified-id parsing code.
Also, use UnqualifiedId to simplify the Action interface for building
id-expressions. ActOnIdentifierExpr, ActOnCXXOperatorFunctionIdExpr,
ActOnCXXConversionFunctionExpr, and ActOnTemplateIdExpr have all been
removed in favor of the new ActOnIdExpression action.
llvm-svn: 85904
2009-11-03 16:56:39 +00:00
Mike Stump
462a4aa787
Fix documentation.
...
llvm-svn: 85901
2009-11-03 16:11:57 +00:00
Benjamin Kramer
8a712c7866
Update CMakeLists.
...
llvm-svn: 85898
2009-11-03 13:37:33 +00:00
Zhongxing Xu
27fee83ec4
Pull VLA size checker into its own files.
...
Split it to two checkers, one for undefined size,
the other for zero size, so that we don't need to query the size
when emitting the bug report.
llvm-svn: 85895
2009-11-03 12:13:38 +00:00
Daniel Dunbar
865418a462
Add link to FatELF project.
...
llvm-svn: 85888
2009-11-03 08:18:34 +00:00
Ted Kremenek
18c7ceee16
Implement: <rdar://problem/6250216> Warn against using -[NSAutoreleasePool release] in GC mode
...
llvm-svn: 85887
2009-11-03 08:03:59 +00:00
Ted Kremenek
924316d7d7
Move 'static inline' functions GetNullarySelector() and GetUnarySelector() from CFRefCount.cpp to ASTContext.h. These functions are likely to be generally useful.
...
llvm-svn: 85886
2009-11-03 08:00:42 +00:00
Daniel Dunbar
83e3714902
XFAIL Driver/hello.c on Windows.
...
llvm-svn: 85885
2009-11-03 07:49:31 +00:00
Zhongxing Xu
9b9d731a8b
Pull AttrNonNullChecker into its own files.
...
llvm-svn: 85883
2009-11-03 07:35:33 +00:00
Daniel Dunbar
a3b52d7fb4
Add target_triple to Clang site configuration.
...
llvm-svn: 85881
2009-11-03 07:25:53 +00:00
Daniel Dunbar
a530841b4f
Switch XFAIL format to match LLVM.
...
llvm-svn: 85880
2009-11-03 07:25:45 +00:00
Zhongxing Xu
b42929d773
Update CMake file.
...
llvm-svn: 85879
2009-11-03 07:14:39 +00:00
Ted Kremenek
df8016aabb
Rename NSErrorCheck to NSErrorChecker.
...
llvm-svn: 85877
2009-11-03 06:59:59 +00:00
Ted Kremenek
3684c65ded
Update CMake file.
...
llvm-svn: 85876
2009-11-03 06:46:41 +00:00
Zhongxing Xu
ab162e1873
Pull UndefinedArgChecker into its own files.
...
llvm-svn: 85875
2009-11-03 06:46:03 +00:00
Ted Kremenek
66791d5dc5
Fix buffer overflow in PrintMacroDefinition() by inverting the check to see if the target buffer needs to be resized. Fixes <rdar://problem/7255377>.
...
llvm-svn: 85872
2009-11-03 06:18:05 +00:00
Zhongxing Xu
0deca3486e
Pull BadCallChecker into its own files.
...
llvm-svn: 85868
2009-11-03 05:48:04 +00:00
Ted Kremenek
43edaa8432
retain/release checker: CGBitmapContextCreateWithData() returns an owned object.
...
llvm-svn: 85867
2009-11-03 05:39:12 +00:00
Ted Kremenek
d1b67db2e8
retain/release checker: Add special handling of CGBitmapContextCreateWithData().
...
Fixes: <rdar://problem/7358899>
llvm-svn: 85864
2009-11-03 05:34:07 +00:00
Chris Lattner
3deabca934
pr5371 likely has nothing to do with this.
...
llvm-svn: 85862
2009-11-03 05:11:39 +00:00
Mike Stump
92e5f8cb39
Refine codegen for non-virtual this adjustments for thunks.
...
llvm-svn: 85856
2009-11-03 03:16:46 +00:00
John McCall
cfefb6d197
Switch ParseStructDeclaration to a callback-based API. This will make
...
it easier to track within Sema whether the parser is parsing a declaration.
llvm-svn: 85855
2009-11-03 02:38:08 +00:00
John Thompson
616798c31f
Fixed for running on Windows.
...
llvm-svn: 85854
2009-11-03 02:36:47 +00:00
Mike Stump
f358972fdc
Add virtual adjustments for this for thunks.
...
llvm-svn: 85852
2009-11-03 02:12:59 +00:00
Douglas Gregor
7861a80346
Introduce a new class, UnqualifiedId, that provides a parsed
...
representation of a C++ unqualified-id, along with a single parsing
function (Parser::ParseUnqualifiedId) that will parse all of the
various forms of unqualified-id in C++.
Replace the representation of the declarator name in Declarator with
the new UnqualifiedId class, simplifying declarator-id parsing
considerably and providing more source-location information to
Sema. In the future, I hope to migrate all of the other
unqualified-id-parsing code over to this single representation, then
begin to merge actions that are currently only different because we
didn't have a unqualified notion of the name in the parser.
llvm-svn: 85851
2009-11-03 01:35:08 +00:00
Fariborz Jahanian
a386d9533b
Assortment of property attributes declared in continuation
...
class must match those of same property declared
in its primary class. (Fixes radar 7352425)
llvm-svn: 85843
2009-11-03 00:01:38 +00:00
Mike Stump
31e1d43729
Add basic codegen for thunks that return values.
...
llvm-svn: 85842
2009-11-02 23:47:45 +00:00
Mike Stump
33ccd9e354
Refine codegen for thunks.
...
llvm-svn: 85839
2009-11-02 23:22:01 +00:00
Ted Kremenek
fac290d359
Remove GRExprEngine::CheckerVisitLocation(). It was only called in one place, so we inlined it in to GRExprEngine::EvalLocation().
...
llvm-svn: 85838
2009-11-02 23:19:29 +00:00
Fariborz Jahanian
de8db16a7d
Property declared in continuation class can only be used to
...
change a readonly property declared in the class (and its inherited protocols)
to writable property. (Fixes radar 7350645).
llvm-svn: 85836
2009-11-02 22:45:15 +00:00
John Thompson
ac0b098d4d
Added __has_include and __has_include_next.
...
llvm-svn: 85834
2009-11-02 22:28:12 +00:00
Ted Kremenek
f639b84bc5
Hopefully make gcc-4.0 happy with respect to the following warning:
...
warning: 'class clang::StackFrameContext' has virtual functions but non-virtual destructor
llvm-svn: 85833
2009-11-02 22:24:53 +00:00
Daniel Dunbar
cb68cdfb03
Sort export list.
...
llvm-svn: 85832
2009-11-02 22:23:08 +00:00
Daniel Dunbar
1e6add1fbb
Remove unused header.
...
llvm-svn: 85828
2009-11-02 22:11:26 +00:00
Chris Lattner
3fab58d867
clean up namespace.
...
llvm-svn: 85826
2009-11-02 21:48:09 +00:00
Edward O'Callaghan
06231460b3
Add note to FIXME about PR5371.
...
llvm-svn: 85825
2009-11-02 21:25:11 +00:00
Ted Kremenek
69e584d12b
Add "virtual" keywords for clarity.
...
llvm-svn: 85815
2009-11-02 18:54:58 +00:00
Fariborz Jahanian
ec344ed2f5
Diagnose implementation of a property declared in a category
...
in its class implementation instead of crashing. Fixes radar 7350345.
llvm-svn: 85813
2009-11-02 18:45:36 +00:00
Douglas Gregor
0840cc02ce
When determining whether a reference to a static data member is an
...
integral constant expression, make sure to find where the initializer
was provided---inside or outside the class definition---since that can
affect whether we have an integral constant expression (and, we need
to see the initializer itself).
llvm-svn: 85741
2009-11-01 20:32:48 +00:00
Douglas Gregor
5897e097a6
Within a template, qualified name lookup can refer to a non-dependent type
...
that is not known to be a base class at template definition time due
to some dependent base class. Treat qualified name lookup that refers
to a non-static data member or function as implicit class member
access when the "this" type would be dependent.
llvm-svn: 85718
2009-11-01 17:08:18 +00:00
Benjamin Kramer
170a56f135
Add missing colons for FileCheck.
...
llvm-svn: 85683
2009-10-31 20:42:26 +00:00
Mike Stump
0a65b636ce
Fix -pthread on dragonfly. Patch by Sascha Wildner.
...
llvm-svn: 85679
2009-10-31 20:11:46 +00:00
Mike Stump
75ce573815
Refine vcall/vbase ordering with vtable construction.
...
llvm-svn: 85677
2009-10-31 20:06:59 +00:00
Douglas Gregor
954de17977
Implement "incremental" template instantiation for non-type template
...
parameters and template type parameters, which occurs when
substituting into the declarations of member templates inside class
templates. This eliminates errors about our inability to "reduce
non-type template parameter depth", fixing PR5311.
Also fixes a bug when instantiating a template type parameter
declaration in a member template, where we weren't properly reducing
the template parameter's depth.
LLVM's StringSwitch header now parses.
llvm-svn: 85669
2009-10-31 17:21:17 +00:00
Douglas Gregor
bff4e7d180
Fix the type of __builtin_expect, from Ed Schouten!
...
llvm-svn: 85666
2009-10-31 16:04:14 +00:00
Douglas Gregor
249c121883
Add two missing CINDEX_LINKAGE uses, in libCIndex, from Kovarththanan
...
Rajaratnam!
llvm-svn: 85665
2009-10-31 15:48:08 +00:00
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
2261bcadd1
Add header comments.
...
llvm-svn: 85644
2009-10-31 04:12:21 +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
f3355a61c4
Remove clang-cc code for handling -mmacosx-version-min and
...
-miphoneos-version-min.
llvm-svn: 85601
2009-10-30 18:12:31 +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
John McCall
edf97c4b02
Finally suppress a compiler warning from gcc on release-asserts. Also fixes
...
a crash on <vector> in same, which bears additional investigation.
llvm-svn: 85598
2009-10-30 17:53:18 +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
Benjamin Kramer
53ba5f21ff
Doug says this is medium done.
...
llvm-svn: 85592
2009-10-30 14:54:38 +00:00
Benjamin Kramer
c1dea5dded
cxx_status: fix some missing/wrong cells.
...
llvm-svn: 85591
2009-10-30 14:41:58 +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
Mike Stump
dc28a8b997
Add yet more testcases.
...
llvm-svn: 85535
2009-10-29 23:29:54 +00:00
Mike Stump
eb5c92b399
Add some more testcases.
...
llvm-svn: 85534
2009-10-29 23:22:14 +00:00
John McCall
314681a338
Silence a gcc warning where it notices that default-constructing a class
...
doesn't initialize anything.
llvm-svn: 85533
2009-10-29 23:20:43 +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
Daniel Dunbar
7ad807f248
Move some clang-cc errors to use diagnostics, and simplify.
...
llvm-svn: 85527
2009-10-29 21:05:18 +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
Steve Naroff
a4aeed6958
clang_getDeclSpelling(): For category implementations, make sure we hand back the category name (not the class name). This fixes <rdar://problem/7297518>.
...
llvm-svn: 85521
2009-10-29 18:55:50 +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
Ted Kremenek
a4bb75e486
Update checker build.
...
llvm-svn: 85511
2009-10-29 16:18:45 +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
Douglas Gregor
2b09590321
Fix Release-Asserts build breakage
...
llvm-svn: 85509
2009-10-29 15:25:40 +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
901668f306
Apparently when is now.
...
llvm-svn: 85501
2009-10-29 08:17:34 +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