Benjamin Kramer
9e9ddf6100
Use StringRefs in InitHeaderSearch::AddDelimitedPaths.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90852 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 12:11:06 +00:00
Benjamin Kramer
47daf68c15
Use Path.makeAbsolute() and make a constant std::string a const char*.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90851 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 11:02:29 +00:00
John McCall
454feb9da6
The refactor of implicit member access expressions means we don't need this
...
horrible isAddressOfOperand hack in TreeTransform, since that syntactic
information is managed by the initial parser callbacks now.
That's enough insomniac commits for one night.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90849 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 09:21:05 +00:00
John McCall
dbd872f273
DeclRefExpr stores a ValueDecl internally.
...
Template instantiation can re-use DeclRefExprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90848 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 09:08:17 +00:00
Zhongxing Xu
7c9624ba29
Refactor builtin function evaluation into a checker.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90847 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 09:07:59 +00:00
John McCall
604e7f14d6
Correctly implement the C++03 and 0x restrictions on class-member using
...
declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90843 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 07:46:18 +00:00
John McCall
e8174bc483
Add CXXRecordDecl::forallBases to walk an inheritance hierarchy with non-lookup
...
semantics and CXXRecordDecl::isProvablyNotDerivedFrom to assist with
pre-instantiation diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90842 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 07:42:38 +00:00
Eli Friedman
ceb9bb3038
Build fix.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90841 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 06:54:20 +00:00
Eli Friedman
77a259c6db
Fix for PR5707: make sure implicit copy constructors initialize the vtable
...
pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90840 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 06:46:18 +00:00
Eli Friedman
7ac1c9ef0b
Small compatibility fix for -print-decl-contexts.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90838 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 06:22:37 +00:00
Eli Friedman
6bc20135a2
Fix for PR5710: make sure to put function template specializations into the
...
DeclContext, so they don't completely disappear from the AST.
I don't particularly like this fix, but I don't see any obviously better way
to deal with it, and I think it's pretty clearly an improvement; comments
welcome.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90835 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 05:40:03 +00:00
Zhongxing Xu
77f4165918
brace completion.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90833 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 05:05:26 +00:00
Eli Friedman
0259ce2b4a
Slight tweak to vtable linkage.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90832 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 04:09:14 +00:00
Eli Friedman
61eab88721
Misc key function fixes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90831 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 03:56:49 +00:00
Fariborz Jahanian
7e42cf2ca1
Patch to warn when discarding objective-c pointer type qualifiers
...
Still some refactoring to do.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90830 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 03:35:08 +00:00
Douglas Gregor
ba03dfddc3
Remove dead diagnostics
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90827 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 02:36:01 +00:00
Eli Friedman
265f52e920
Get rid of some diagnostics that don't follow our rules for -pedantic
...
diagnostics (specifically, that any extension in a compiler-reserved namespace
shouldn't trigger a diagnostic).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90826 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 02:22:26 +00:00
Eli Friedman
c4451dbb4f
Fix some direct checks of expressions which might be surrounded by parentheses.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90825 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 02:09:46 +00:00
Eli Friedman
ebc3317c66
Make copy assignment operator synthesis not explode for classes with complex
...
or non-record aggregate members.
It might be worth spending some time to optimize this code (and the parallel
code for copy constructors) to memcpy in larger chunks, rather than copying
one member at a time. Not sure exactly how beneficial that would be, but
it seems like could help for large classes with, for example, a vtable pointer
forcing the generation of a copy constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 01:57:53 +00:00
Jeffrey Yasskin
e3fdca2ee0
Remove several .c_str() to be forward-compatible with StringRef.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 01:46:24 +00:00
Mike Stump
b2debeb96d
Fixup catch parameters with class reference type. WIP.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90821 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 01:29:31 +00:00
Anders Carlsson
c2456824a1
No need to add tail padding if the resulting LLVM struct type will have the same size as the final record size.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90820 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 01:24:23 +00:00
Eli Friedman
b455f0e74b
A bunch more thunk fixes from misc testing.
...
(Yes, I do intend to commit some tests for this.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90818 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 23:56:34 +00:00
Mike Stump
cce3d4f981
Add codegen support for exception specifications. WIP.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90817 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 23:38:24 +00:00
John McCall
812c15476c
Recover from dot accesses to record pointers and arrow accesses to records.
...
Patch by Nicola Gigante!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90814 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 22:46:59 +00:00
Ted Kremenek
b40d06dec2
Enable '-analyzer-opt-analyze-nested-blocks' by default for testing.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90812 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 22:26:14 +00:00
Ted Kremenek
fc576514d0
Add clang-cc option '-analyzer-opt-analyze-nested-blocks' to treat block literals as an entry point for analyzer checks.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90810 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 22:06:12 +00:00
Ted Kremenek
67d1287035
Add analysis support for blocks. This includes a few key changes:
...
- Refactor the MemRegion hierarchy to distinguish between different StackSpaceRegions for locals and parameters.
- VarRegions for "captured" variables now have the BlockDataRegion as their super region (except those passed by reference)
- Add transfer function support to GRExprEngine for BlockDeclRefExprs.
This change also supports analyzing blocks as an analysis entry point
(top-of-the-stack), which required pushing more context-sensitivity
around in the MemRegion hierarchy via the use of LocationContext
objects. Functionally almost everything is the same, except we track
LocationContexts in a few more areas and StackSpaceRegions now refer
to a StackFrameContext object. In the future we will need to modify
MemRegionManager to allow multiple StackSpaceRegions in flight at once
(for the analysis of multiple stack frames).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90809 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 22:05:27 +00:00
Ted Kremenek
3cdff236e2
Add the BlockDecl to the DeclContext.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90808 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 22:01:30 +00:00
Eli Friedman
48daf59c9f
Correctly handle conditional operators involving throw.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90800 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 20:25:53 +00:00
Eli Friedman
130c69e969
Make the comma operator consistently call EnsureInsertPoint.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90799 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 20:18:11 +00:00
Mike Stump
c2ab486980
Work around emitters that can't deal with dead code contexts yet.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90796 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 20:12:14 +00:00
Fariborz Jahanian
6d910f07d8
Allow accessing 'isa' via '->' operator.
...
(fixes radar 7447251).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90795 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 20:09:25 +00:00
Anders Carlsson
91f8860de5
Mangle basic_ostream and basic_iostream specializations.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90794 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 19:56:42 +00:00
Mike Stump
bc773a0bd2
Switch over to checking .ll files instead of .s files.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90786 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 19:22:29 +00:00
Mike Stump
4bda1e4487
Remove obsolete fallback code for objectsize.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90780 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 18:58:11 +00:00
Nuno Lopes
079b49550d
implement PR5274: mark 'restrict' parameters as noalias
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90778 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 18:30:06 +00:00
Rafael Espindola
7ca7987669
Shorten the help test for -no-canonical-prefixes, put it behind HelpHidden and
...
claim it in Driver.cpp instead of Tools.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90777 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 18:28:29 +00:00
Fariborz Jahanian
2b5ff1a147
Patch to allow restrict applied to id/Class types.
...
(fixes radar 7442244).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90773 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 18:08:58 +00:00
Nuno Lopes
33cc2437ae
add fedora 12 include path
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90772 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 17:18:48 +00:00
Chris Lattner
5d8031687d
reduce nesting.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90769 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 16:33:19 +00:00
Douglas Gregor
2a7925c4ab
When in an Objective-C instance method, super is a valid code-completion result
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90758 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 09:54:55 +00:00
Douglas Gregor
9a0c85e640
Code completion for Objective-C @ keywords that are statements or expressions
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90757 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 09:51:25 +00:00
Douglas Gregor
c464ae8444
Code completion for Objective-C @ directives
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90756 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 09:27:33 +00:00
Zhongxing Xu
935ef90f4b
Add EvalCallExpr interface to checker, and migrate the no-return function
...
handler to this interface.
GRExprEngine::CheckerEvalCall() will return true if one of the checkers has
processed the node. In the future this might return void when we have some
default checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 09:17:35 +00:00
Anders Carlsson
863dbcb45e
Instantiated or specialized class templates never have a key function. This (and the previous check-in) fixes PR5557.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90753 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 08:29:39 +00:00
Anders Carlsson
d6a637f8c8
Rework how virtual member functions are marked. If a class has no key function, we now wait until the end of the translation unit to mark its virtual member functions as references. This lays the groundwork for fixing PR5557.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90752 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 08:24:59 +00:00
Anders Carlsson
d58987c67d
It's OK to try to emit a vtable definition more than once. Fixes PR5697.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90751 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 07:59:52 +00:00
Anders Carlsson
b13e357dac
getTemplateSpecializationKind should be const.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90750 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 06:33:48 +00:00
Douglas Gregor
fa184a4652
Remove empty test cases
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90749 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 06:11:34 +00:00