Chandler Carruth
d50f169098
Richard Smith was correct about how the sets should be computed for
...
this. My suggestion assumed a viable erase method for iterators on
SmallPtrSet.
This patch restores his original pattern.
llvm-svn: 132673
2011-06-05 23:36:55 +00:00
Richard Smith
998a591e32
Fix PR10053: Improve diagnostics and error recovery for code which some compilers incorrectly accept due to a lack of proper support for two-phase name lookup.
...
llvm-svn: 132672
2011-06-05 22:42:48 +00:00
Benjamin Kramer
f90b5de834
Toolchain support for Ubuntu Oneiric. Patch by Michael Wild!
...
llvm-svn: 132669
2011-06-05 16:08:59 +00:00
Sebastian Redl
d201edf1fc
Drop most of InitializationSequence::SequenceKind's values. They didn't really contain any information that the step array didn't contain too. This makes debugging dumps a bit less informative, but probably not significantly so. The advantage is that the redundancy is gone, so the code is easier to understand.
...
ReferenceBinding is still there, because it is used in some unclear code.
llvm-svn: 132667
2011-06-05 13:59:11 +00:00
Sebastian Redl
724bfe18b7
Remove more references to FailedSequence.
...
llvm-svn: 132666
2011-06-05 13:59:05 +00:00
Sebastian Redl
c7ca587512
Remove all references to InitializationSequence::FailedSequence from outside SemaInit.cpp. Replace them with the boolean conversion or the new Failed() function. This is a first step towards removing InitializationSequence::SequenceKind. No functionality change.
...
llvm-svn: 132664
2011-06-05 12:23:28 +00:00
Sebastian Redl
3da3489e49
Parse C++0x generalized initializers.
...
llvm-svn: 132662
2011-06-05 12:23:16 +00:00
Douglas Gregor
377c109f21
Identity and non-identity standard conversion sequences can be
...
compared even when one is a reference binding and the other is not
(<rdar://problem/9173984>), but the definition of an identity sequence
does not involve lvalue-to-rvalue adjustments (PR9507). Fix both
inter-related issues.
llvm-svn: 132660
2011-06-05 06:15:20 +00:00
Douglas Gregor
c507db4f70
Add name mangling for expr .* expr. Fixes PR9983 / <rdar://problem/9486332>.
...
llvm-svn: 132659
2011-06-05 05:27:58 +00:00
Douglas Gregor
7f139d8103
Allow block returns in C++ with the form
...
return <expression> ;
in blocks with a 'void' result type, so long as <expression> has type
'void'. This follows the rules for C++ functions.
llvm-svn: 132658
2011-06-05 05:14:41 +00:00
Douglas Gregor
0aa91e0a66
When inferring the result type of a block based on a return statement
...
with a type-dependent expression, infer the placeholder type
'Context.DependentTy' to indicate that this is just a
placeholder. Fixes PR9982 / <rdar://problem/9486685>.
llvm-svn: 132657
2011-06-05 05:04:23 +00:00
Rafael Espindola
d1ca71a294
Fix cmake build.
...
llvm-svn: 132653
2011-06-04 23:22:38 +00:00
Richard Smith
c2ed270c0f
Remove the old implementation of -verify, which has been dead code since r88750.
...
llvm-svn: 132651
2011-06-04 21:35:57 +00:00
Roman Divacky
5e300b82e2
Adjust the linker for PowerPC64/-m32 on FreeBSD too.
...
llvm-svn: 132635
2011-06-04 07:40:24 +00:00
Roman Divacky
00859c29bf
Make -m32 work on FreeBSD/PowerPC64.
...
llvm-svn: 132634
2011-06-04 07:37:31 +00:00
Nick Lewycky
97864dac76
On linux, -nostdlib was causing a --start-group with no --end-group to be passed
...
to the linker.
llvm-svn: 132629
2011-06-04 06:27:06 +00:00
Nick Lewycky
62188bbb90
Identifiers with _CapitalLetter are reserved, so don't use them. Prefer the
...
common C++ pattern of using the same name for the constructor argument as you
do for the member. Noticed by inspection.
llvm-svn: 132626
2011-06-04 05:19:42 +00:00
Alexis Hunt
4ac55e33be
Reimplement r132572 on top of a FoldingSet, thus hopefully solving both
...
the self-host failures and Chandler's concerns.
llvm-svn: 132622
2011-06-04 04:32:43 +00:00
Jordy Rose
fb5e8c2814
[analyzer] Change an indent-if to an early return. No functionality change.
...
llvm-svn: 132618
2011-06-04 01:50:25 +00:00
Jordy Rose
097c5397a8
[analyzer] Don't crash when copying an unknown number of bytes with memcpy(). Also handle all memcpy-family return values in evalCopyCommon(), rather than having some outside and some inside.
...
llvm-svn: 132617
2011-06-04 01:47:27 +00:00
Jordy Rose
64ae92e5c5
[analyzer] Remove extra assignment that actually lost a few of the assumptions.
...
llvm-svn: 132614
2011-06-04 01:22:21 +00:00
Tanya Lattner
55808c1026
Add support for builtin astype:
...
__builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types.
Added test case.
llvm-svn: 132612
2011-06-04 00:47:47 +00:00
Devang Patel
1b291b22d0
Rework r132576.
...
Emit debug info only if there is an insertion point. The debug info should not force an insertion point. Codegen may later on decide to not emit code for some reason, see extensive comment in CodeGenFunction::EmitStmt(), and debug info should not get in the way.
llvm-svn: 132610
2011-06-04 00:38:02 +00:00
Jordy Rose
4451cd4511
[analyzer] Fix comment for (still-disabled) evalStrncpy
...
llvm-svn: 132608
2011-06-04 00:05:23 +00:00
Jordy Rose
63b84be6cb
[analyzer] Fix handling of "copy zero bytes" for memcpy and friends.
...
llvm-svn: 132607
2011-06-04 00:04:22 +00:00
Jordy Rose
aee7fb9e64
[analyzer] __mempcpy_chk is the same as mempcpy (at least to CStringChecker)
...
llvm-svn: 132605
2011-06-03 23:42:56 +00:00
Jonathan D. Turner
205c7d559f
Improvements to abbreviations for PCH which add support for EnumDecl, ObjCIvarDecl, TypedefDecl, VarDecl and FieldDecl and improve support for ParmVarDecl.
...
llvm-svn: 132604
2011-06-03 23:11:16 +00:00
Douglas Gregor
4cd65962dc
Expose @synthesize and @dynamic via their own cursor kinds in
...
libclang. Fixes <rdar://problem/9537904>.
llvm-svn: 132603
2011-06-03 23:08:58 +00:00
Jonathan D. Turner
d09655fce5
Test of commit access.
...
llvm-svn: 132596
2011-06-03 21:46:44 +00:00
Alexis Hunt
967ea7ca6b
Revert r132572 to figure out why it broke selfhost and clean it up as
...
suggested by Chandler.
llvm-svn: 132593
2011-06-03 21:10:40 +00:00
Devang Patel
887e215e64
Emit debug info only if there is an insertion point. The debug info should not force an insertion point. Codegen may later on decide to not emit code for some reason, see extensive comment in CodeGenFunction::EmitStmt(), and debug info should not get in the way.
...
llvm-svn: 132576
2011-06-03 19:21:47 +00:00
Alexis Hunt
1b02ed8c7c
Begin implementing a cache of special member lookups. Currently only
...
destructors are implemented but other special members are on the way,
which is where the real benefits of this will be visible.
llvm-svn: 132572
2011-06-03 18:36:49 +00:00
Matt Beaumont-Gay
aef8c72255
Don't warn about -Wno-foo where foo is an unknown warning option. Explicitly
...
passing -Wunknown-warning-option will re-enable warnings about -Wno-foo.
llvm-svn: 132570
2011-06-03 18:30:50 +00:00
Hans Wennborg
cf9bac4bc9
Warn about missing parentheses for conditional operator.
...
Warn in cases such as "x + someCondition ? 42 : 0;",
where the condition expression looks arithmetic, and has
a right-hand side that looks boolean.
This (partly) addresses http://llvm.org/bugs/show_bug.cgi?id=9969
llvm-svn: 132565
2011-06-03 18:00:36 +00:00
Hans Wennborg
0bb0df5839
Make -Wignored-qualifiers point to the first ignored qualifier.
...
In code such as "char* volatile const j()", Clang warns that "volatile
const" will be ignored. Make it point to the first ignored qualifier,
and simplify the code a bit.
llvm-svn: 132563
2011-06-03 17:37:26 +00:00
Devang Patel
f1e2a7f0f0
Simplify.
...
llvm-svn: 132560
2011-06-03 17:23:47 +00:00
Devang Patel
597a730cb8
Fix typedef's context.
...
llvm-svn: 132557
2011-06-03 17:05:26 +00:00
Rafael Espindola
304902141e
We were looking at /usr/lib only if the distro had multilib. This is bogus:
...
we look in /usr/lib to find crt1.o, and that depends only on where libc
is installed.
This fixes the case of using a different gcc installation in a distro
without multilib.
llvm-svn: 132551
2011-06-03 15:39:42 +00:00
Rafael Espindola
d8f92c8dcc
Add support for centos.
...
llvm-svn: 132550
2011-06-03 15:23:24 +00:00
Eric Christopher
e97fee6c86
80-column cleanup.
...
llvm-svn: 132548
2011-06-03 14:52:25 +00:00
Douglas Gregor
28de7a9a1e
Improve the instantiation of static data members in
...
Sema::RequireCompleteExprType() a bit more, setting the point of
instantiation if needed, and skipping explicit specializations entirely.
llvm-svn: 132547
2011-06-03 14:28:43 +00:00
Francois Pichet
b503705e0d
Revert r132544. Accidental commit. I got confused with the Tortoise SVN menu.
...
llvm-svn: 132546
2011-06-03 13:59:45 +00:00
Francois Pichet
d4de06861d
(no commit message)
...
llvm-svn: 132544
2011-06-03 13:51:55 +00:00
Eric Christopher
55d4989304
80-col cleanup.
...
llvm-svn: 132543
2011-06-03 13:28:31 +00:00
Eric Christopher
12d48f7cf1
Separate out these paths a bit by architecture. There are likely other
...
places this is a problem.
llvm-svn: 132542
2011-06-03 13:24:15 +00:00
Eric Christopher
43a517c7ac
Add multi-arch include support for Ubuntu 11.11 with gcc 4.6.0.
...
Patch by Tobias Hunger!
Fixes PR10008
llvm-svn: 132541
2011-06-03 13:06:30 +00:00
Benjamin Kramer
38bcb72ee0
Copy IsWarnIfUnused too when making a copy of a MacroInfo.
...
Found by valgrind.
llvm-svn: 132540
2011-06-03 10:33:36 +00:00
Francois Pichet
dd04c69a13
My testing shows that function stat has no problem with trailing separators. (tested on Windows and Darwin).
...
This fixes a bug on Windows:
clang c:\test.cpp
Here the call stat("c:") is not recognized as a directory (must be "c:\").
llvm-svn: 132539
2011-06-03 09:44:29 +00:00
Francois Pichet
21cd5db7bd
Correctly revert r131347: function explicit specialization at class scope.
...
I'll try to implement this functionality again soon.
llvm-svn: 132536
2011-06-03 07:35:49 +00:00
Chandler Carruth
ac6872655b
Clean up the "non-POD memaccess" stuff some. This adds a properly named
...
diagnostic group to cover the cases where we have definitively bad
behavior: dynamic classes.
It also rips out the existing support for POD-based checking. This
didn't work well, and triggered too many false positives. I'm looking
into a possibly more principled way to warn on the fundamental buggy
construct here. POD-ness isn't the critical aspect anyways, so a clean
slate is better. This also removes some silliness from the code until
the new checks arrive.
llvm-svn: 132534
2011-06-03 06:23:57 +00:00