Anders Carlsson
d3bc31f04f
Get rid of the CastInfo struct.
...
llvm-svn: 81839
2009-09-15 05:13:45 +00:00
Anders Carlsson
7cd39e0721
Handle reinterpret_cast between integral types and pointer types.
...
llvm-svn: 81837
2009-09-15 04:48:33 +00:00
Fariborz Jahanian
19c7328881
Issue a good diagnostics when attempt to select
...
a type convesion function results in ambiguity.
llvm-svn: 81812
2009-09-15 00:10:11 +00:00
Ted Kremenek
4112969df1
Fix: <rdar://problem/5905851> do not report a leak when post-dominated by a call
...
to a noreturn or panic function
llvm-svn: 81803
2009-09-14 22:01:32 +00:00
John McCall
27b5c253d8
Skeletal support for friend class templates.
...
llvm-svn: 81801
2009-09-14 21:59:20 +00:00
Anders Carlsson
0e795ffbb0
For consistency, use "bit-field" instead of "bitfield" in our diagnostics.
...
llvm-svn: 81797
2009-09-14 21:48:24 +00:00
Douglas Gregor
0ff7d92048
Implement partial ordering of function template specializations
...
(C++ [temp.func.order]).
llvm-svn: 81777
2009-09-14 18:39:43 +00:00
Sam Weinig
5be00aae4f
Remove duplicate definition of char-subscripts DiagGroup.
...
llvm-svn: 81775
2009-09-14 17:50:09 +00:00
Sam Weinig
914244e7b0
Add support for -Wchar-subscripts. Fixes PR4801.
...
llvm-svn: 81747
2009-09-14 01:58:58 +00:00
Daniel Dunbar
b4091a9c6a
Add TargetInfo::getABI(), and base ARM APCS vs AAPCS choice on that.
...
llvm-svn: 81735
2009-09-14 00:35:03 +00:00
Daniel Dunbar
4ed7898294
Support -mabi= for clang/ARM.
...
llvm-svn: 81734
2009-09-14 00:34:46 +00:00
Daniel Dunbar
4e97bc3ee7
Add -target-abi clang-cc option, currently unused.
...
llvm-svn: 81731
2009-09-14 00:02:12 +00:00
Anders Carlsson
40a90c8754
Fix a bug in getFriendObjectKind where we would clear out all mask bits except IDNS_TagFriend and IDNS_OrdinaryFriend but then check for IDNS_Tag and IDNS_Ordinary.
...
llvm-svn: 81730
2009-09-13 23:59:13 +00:00
Anders Carlsson
002f2b3eec
CXXMethodDecl::isVirtual needs to check the canonical declaration. Fixes PR4878.
...
llvm-svn: 81715
2009-09-13 21:01:57 +00:00
Eli Friedman
7d45c4884a
Add utility to evaluate lvalues which are an offset relative to a stack
...
location. Patch by Enea Zaffanella.
llvm-svn: 81672
2009-09-13 10:17:44 +00:00
Douglas Gregor
299d76e901
Rework the way we determine whether an externally visible symbol is
...
generated for an inline function definition, taking into account C99
and GNU inline/extern inline semantics. This solution is simpler,
cleaner, and fixes PR4536.
llvm-svn: 81670
2009-09-13 07:46:26 +00:00
Fariborz Jahanian
edca0bcf48
Removed Context argument from couple of methods which don't
...
need them.
llvm-svn: 81621
2009-09-12 19:02:34 +00:00
Fariborz Jahanian
b394f50ac9
More work toward having an access method for visible
...
conversion functions.
llvm-svn: 81618
2009-09-12 18:26:03 +00:00
Benjamin Kramer
c1330af0b9
SmallVectorize preprocessor's token cache. Testing shows there is almost never
...
more than one token in the cache.
llvm-svn: 81612
2009-09-12 09:45:28 +00:00
Douglas Gregor
15fc956ca0
Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID
...
llvm-svn: 81590
2009-09-12 00:22:50 +00:00
Douglas Gregor
16618f2157
Remove unnecessary ASTContext parameters from isMain and isExternC
...
llvm-svn: 81589
2009-09-12 00:17:51 +00:00
Douglas Gregor
e2350a3b97
Eliminate FunctionDecl::getBodyIfAvailable
...
llvm-svn: 81588
2009-09-12 00:08:48 +00:00
Ted Kremenek
7020eae076
Introduce "DefinedOrUnknownSVal" into the SVal class hierarchy, providing a way
...
to statically type various methods in SValuator/GRState as required either a
defined value or a defined-but-possibly-unknown value. This leads to various
logic cleanups in GRExprEngine, and lets the compiler enforce via type checking
our assumptions about what symbolic values are possibly undefined and what are
not.
Along the way, clean up some of the static analyzer diagnostics regarding the uses of uninitialized values.
llvm-svn: 81579
2009-09-11 22:07:28 +00:00
Fariborz Jahanian
b54ccb2782
Patch to build visible conversion function list lazily and make its
...
first use in calling the conversion function on delete statements.
llvm-svn: 81576
2009-09-11 21:44:33 +00:00
John McCall
2f212b3a72
Alter Action's friend interface to prepare for templated friend declarations and
...
to stop making promises we can't currently keep.
llvm-svn: 81571
2009-09-11 21:02:39 +00:00
Douglas Gregor
6411b92ee6
Tweak the semantics of FunctionDecl::isOutOfLine to consider an
...
instantiation of a member function template or member function of a
class template to be out-of-line if the definition of that function
template or member function was defined out-of-line. This ensures that
we get the correct linkage for explicit instantiations of out-of-line
definitions.
llvm-svn: 81562
2009-09-11 20:15:17 +00:00
Douglas Gregor
c732aba9a9
Cleanup and test C++ default arguments. Improvements include:
...
- Diagnose attempts to add default arguments to templates (or member
functions of templates) after the initial declaration (DR217).
- Improve diagnostics when a default argument is redefined. Now, the
note will always point at the place where the default argument was
previously defined, rather than pointing to the most recent
declaration of the function.
llvm-svn: 81548
2009-09-11 18:44:32 +00:00
John McCall
1806c2795b
Track a class template specialization's point of instantiation separately
...
from its location. Initialize appropriately.
When implicitly creating a declaration of a class template specialization
after encountering the first reference to it, use the pattern class's
location instead of the location of the first reference.
llvm-svn: 81515
2009-09-11 07:25:08 +00:00
John McCall
e1f2ec28d8
When stringizing a NamedDecl for a diagnostic, treat the template
...
specialization types differently.
llvm-svn: 81512
2009-09-11 06:45:03 +00:00
John McCall
7f41d98928
Support elaborated dependent types and diagnose tag mismatches.
...
llvm-svn: 81504
2009-09-11 04:59:25 +00:00
Zhongxing Xu
dc299bc481
Start to add a new transfer function that inlines callee. To be continued.
...
llvm-svn: 81501
2009-09-11 04:13:42 +00:00
Anders Carlsson
0b209a8632
Instantiate PredefinedExprs correctly. Patch by Sam Weinig!
...
llvm-svn: 81498
2009-09-11 01:22:35 +00:00
Daniel Dunbar
33a004e9eb
Swizzle the target triple based on -mthumb, and update clang-cc to recognize
...
thumb-foo-bar as an ARM target.
llvm-svn: 81497
2009-09-11 01:14:50 +00:00
Douglas Gregor
73341c4e63
Diagnose VLAs as an error in C++.
...
Also, treat the GNU __null as an integral constant expression to match
GCC's behavior.
llvm-svn: 81490
2009-09-11 00:18:58 +00:00
Daniel Dunbar
7848592ec6
Initial handling of -m{soft-float,hard-float,float-abi=} for ARM.
...
llvm-svn: 81471
2009-09-10 23:00:09 +00:00
Fariborz Jahanian
2cde203392
Non fragile ABI for GNU runtime. Patch bu David Chisnall.
...
llvm-svn: 81462
2009-09-10 21:48:21 +00:00
Douglas Gregor
7f737c0015
When performing unqualified name lookup into a DeclContext, also look into
...
all of the parent DeclContexts that aren't represented within the
Scope chain. This fixes some name-lookup problems in out-of-line
definitions of members of nested classes.
llvm-svn: 81451
2009-09-10 16:57:35 +00:00
Zhongxing Xu
7e3431b5cf
Make AnalysisManager stateless. Now other analyzer components only depends on
...
local node information.
llvm-svn: 81433
2009-09-10 05:44:00 +00:00
Daniel Dunbar
2ffe029a61
Implement Darwin/ARM behavior for defaulting to -fno-builtin-str{cat,cpy}.
...
llvm-svn: 81425
2009-09-10 03:37:02 +00:00
Daniel Dunbar
9000c3ff6d
Recognize and ignore -Woverloaded-virtual.
...
llvm-svn: 81419
2009-09-10 01:20:58 +00:00
Daniel Dunbar
cb5f2cf694
Fix dependencies for DiagnosticGroups.td.
...
llvm-svn: 81418
2009-09-10 01:20:50 +00:00
Douglas Gregor
5d3507d39c
Improve handling of initialization by constructor, by ensuring that
...
such initializations properly convert constructor arguments and fill
in default arguments where necessary. This also makes the ownership
model more clear.
llvm-svn: 81394
2009-09-09 23:08:42 +00:00
Daniel Dunbar
1ce81538f1
Change Get{File,Program}Path to return an std::string (instead of a sys::Path).
...
llvm-svn: 81389
2009-09-09 22:33:00 +00:00
Daniel Dunbar
5f620c1fac
StringRefize ArgList construction of ArgStrings.
...
llvm-svn: 81385
2009-09-09 22:32:26 +00:00
Anders Carlsson
e9766d559b
If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.
...
llvm-svn: 81383
2009-09-09 21:33:21 +00:00
Daniel Dunbar
e7af341454
Push bound architecture name into TranslateArgs.
...
llvm-svn: 81366
2009-09-09 18:36:12 +00:00
Daniel Dunbar
b5d86bbd76
Push bound architecture name into Compilation::getArgsForToolChain.
...
llvm-svn: 81365
2009-09-09 18:36:01 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Mike Stump
030867b97e
Remove tab characters.
...
llvm-svn: 81340
2009-09-09 13:12:01 +00:00
Douglas Gregor
308047d3a5
Initial stab at implement dependent member references to member
...
templates, e.g.,
x.template get<T>
We can now parse these, represent them within an UnresolvedMemberExpr
expression, then instantiate that expression node in simple cases.
This allows us to stumble through parsing LLVM's Casting.h.
llvm-svn: 81300
2009-09-09 00:23:06 +00:00