Nico Weber
1bb8e09c37
Add a Makefile to examples/Tooling for people who do not use cmake.
...
llvm-svn: 130577
2011-04-30 03:03:12 +00:00
Nico Weber
347339f790
Fix Makefile build of examples/clang-interpreter.
...
llvm-svn: 130576
2011-04-30 02:52:27 +00:00
Argyrios Kyrtzidis
c8c7945a40
Add a couple of assertions to make sure the bitfields can fit the value assigned to them. No functionality change.
...
llvm-svn: 130573
2011-04-30 02:28:27 +00:00
Chad Rosier
b9a8525bab
Documentation for -Oz; Updated synopsis and item.
...
llvm-svn: 130570
2011-04-30 02:04:10 +00:00
Chad Rosier
bc8d7c27d9
Add documentation for -Oz flag.
...
llvm-svn: 130569
2011-04-30 01:40:58 +00:00
Chad Rosier
3909e037ab
Removed redundant case statements
...
llvm-svn: 130564
2011-04-30 00:03:48 +00:00
Devang Patel
a3e3fded0a
Tie constructor defintion with its declaration using AT_specification.
...
llvm-svn: 130561
2011-04-29 23:42:32 +00:00
Ted Kremenek
e8e565ab81
Adjust test/Analysis/retain-release.m to also test the retain/release checker in Objective-C++ mode.
...
llvm-svn: 130559
2011-04-29 23:15:53 +00:00
Bob Wilson
9a5f84facb
Add -Oz option and use it to set the inline threshold to 25.
...
Radar 9333566. Patch by Chad Rosier!
llvm-svn: 130554
2011-04-29 22:49:50 +00:00
Fariborz Jahanian
52a8cca56f
removes a meaningless comment.
...
llvm-svn: 130550
2011-04-29 22:11:28 +00:00
Fariborz Jahanian
99514b9168
block variables on lhs need be ir-gen'ed after the
...
rhs when its 'forwarding' pointer may be modified
in rhs evaluation as result of call to Block_copy.
// rdar://9309454
llvm-svn: 130545
2011-04-29 21:53:21 +00:00
Ted Kremenek
491da68ef9
Guard in USRGenerator::GenLoc() against null Decl* from invalid code.
...
llvm-svn: 130541
2011-04-29 21:35:23 +00:00
Chandler Carruth
f9e7410468
Disable -Wnon-pod-memset for now while I try to reduce the false
...
positives still further.
The plan is to:
1) Create a more targeted warning for memset of memory pointing at
a type with virtual methods or bases where a vptr would be
overwritten.
2) Consider turning the above warning back on by default.
3) Evaluate whether any false positives in the existing warning can be
detected and white listed in the warning implementation.
4) If #3 lowers the noise floor enough, enable the full warning in -Wall
or -Wextra.
Comments or suggestions welcome. Even more welcome are specific test
cases which trigger the warning and shouldn't.
llvm-svn: 130538
2011-04-29 20:58:14 +00:00
Ted Kremenek
2b2e06d1a3
Change -Wparentheses to not imply -Widiomatic-parentheses. Users rarely want to see these warnings, and often explicitly pass -Wparentheses.
...
llvm-svn: 130535
2011-04-29 20:30:39 +00:00
Anders Carlsson
73ad5bc9ea
Serialize/deserialize the HasStandardLayout bit when writing/reading PCHs.
...
llvm-svn: 130525
2011-04-29 18:37:25 +00:00
Daniel Dunbar
252e8f9ac1
Driver/cc1as: Forward -mllvm arguments when compiling assembly files.
...
llvm-svn: 130516
2011-04-29 17:53:18 +00:00
Charles Davis
6c488f14f6
Remove comments about __int8 and friends from the mangler. Turns out we don't
...
actually have to implement them, since in modern versions of MSVC they're
aliases to the standard C types.
llvm-svn: 130509
2011-04-29 15:50:52 +00:00
Douglas Gregor
f1fce5d3ef
White-list yet more type trait names, since they're used as
...
identifiers in libc++.
llvm-svn: 130508
2011-04-29 15:31:39 +00:00
David Chisnall
10d2ded910
Don't crash if the AST doesn't have a sensible ObjC id type.
...
llvm-svn: 130500
2011-04-29 14:10:35 +00:00
Chandler Carruth
c37485e6cb
Relax the non-POD memset warning to use the less restrictive C++11
...
definition of POD. Specifically, this allows certain non-aggregate
types due to their data members being private.
The representation of C++11 POD testing is pretty gross. Any suggestions
for improvements there are welcome. Especially the name
'isCXX11PODType()' seems truly unfortunate.
llvm-svn: 130492
2011-04-29 09:46:08 +00:00
Francois Pichet
c867975776
r130381 follow up: accept __uuidof expression for template argument reference.
...
llvm-svn: 130491
2011-04-29 09:08:14 +00:00
Sebastian Redl
2ac2c725e0
Add a decl update when a static data member of a class template is instantiated in a different PCH than its containing class. Otherwise we get double definition errors. Fixes a Boost.MPL problem that affects Boost.Accumulators and probably a lot more of Boost.
...
llvm-svn: 130488
2011-04-29 08:19:30 +00:00
Sebastian Redl
b00047a475
Use std::vector for ASTReader's ASTBuffers, instead of std::deque.
...
llvm-svn: 130487
2011-04-29 08:19:19 +00:00
Sebastian Redl
bc9a20949f
Use -emit-llvm-only as suggested by Argyrios.
...
llvm-svn: 130486
2011-04-29 08:19:03 +00:00
Chandler Carruth
efd5671a27
Don't assume that the AST methods will only be invoked on C++ types.
...
Teaches isLiteralType and isTrivialType to behave plausibly and most
importantly not crash on normal RecordDecls.
Sadly I have no real way to test this. I stumbled onto it by
mis-implementing a warning.
llvm-svn: 130483
2011-04-29 07:47:42 +00:00
Douglas Gregor
f8e894a103
Oops
...
llvm-svn: 130469
2011-04-29 01:50:40 +00:00
Douglas Gregor
63180b1190
libstdc++ 4.2 also uses __is_same as a struct name, which conflicts with our new type trait __is_same
...
llvm-svn: 130468
2011-04-29 01:38:03 +00:00
Douglas Gregor
68dac4676d
Use DirectoryLookup::getName() rather than getDir()->getName() in a context where we don't know whether we have a normal directory
...
llvm-svn: 130467
2011-04-29 00:45:09 +00:00
Ted Kremenek
5e1ed7b8dd
Enhance clang_getCXTUResourceUsage() to report the sizes of the memory buffers used by PCH.
...
llvm-svn: 130460
2011-04-28 23:46:20 +00:00
Fariborz Jahanian
6d003c3041
Fixes debug info generation problem for ms_struct structs.
...
// rdar://8823265
llvm-svn: 130458
2011-04-28 23:43:23 +00:00
Argyrios Kyrtzidis
03535265ef
Cut down unnecessary zero'ing when value-initializing arrays of C++ objects.
...
-C++ objects with user-declared constructor don't need zero'ing.
-We can zero-initialize arrays of C++ objects in "bulk" now, in which case don't zero-initialize each object again.
llvm-svn: 130453
2011-04-28 22:57:55 +00:00
Fariborz Jahanian
8409bce4ac
ms_struct patch for initialization and field access irgen.
...
// rdar://8823265 - wip.
llvm-svn: 130451
2011-04-28 22:49:46 +00:00
Stuart Hastings
9f02fd9d8d
Raise ARM byval minimum size from 32 to 64, addressing a performance
...
regression in mason. rdar://problem/7662569
llvm-svn: 130444
2011-04-28 21:35:59 +00:00
Daniel Dunbar
c44d313cff
Driver/Darwin/ld: Set the deployment target following the version information in
...
the tool chain, instead of based on the translated arguments.
llvm-svn: 130440
2011-04-28 21:23:41 +00:00
Daniel Dunbar
c76da44eeb
tests: Tweak test to not write to the same temporary twice, in the hopes of avoiding sporadic win32 failures about renaming a temporary.
...
llvm-svn: 130439
2011-04-28 21:23:38 +00:00
Ted Kremenek
8d58790019
Enhance clang_getCXTUResourceUsage() to report how much memory is used by SourceManager's memory buffers.
...
llvm-svn: 130433
2011-04-28 20:36:42 +00:00
Argyrios Kyrtzidis
9d3c504078
Get the base element type even in multidimensional arrays.
...
llvm-svn: 130427
2011-04-28 20:07:15 +00:00
Lenny Maiorani
18470e3287
Use StringRef::substr() and unbounded StringRef::compare() instead of bounded version of StringRef::compare() because bounded version of StringRef::compare() is going to be removed.
...
llvm-svn: 130425
2011-04-28 19:31:12 +00:00
Ted Kremenek
414a2c0951
Make the top-level driver ignore -fobjc-default-synthesize-properties while this feature undergoes more review and development. This is still available as a -cc1 option for testing.
...
llvm-svn: 130424
2011-04-28 19:26:03 +00:00
Stuart Hastings
dd77c8efa2
Replace unitary array with scalar. rdar://problem/7662569
...
llvm-svn: 130423
2011-04-28 19:24:47 +00:00
Lenny Maiorani
ed2cc6ccbb
Eliminates an assert in the strncpy/strncat checker caused by not validating a cast was successful. If the value of an argument was unknown, the cast would result in a NULL pointer which was later being dereferenced.
...
This fixes Bugzilla #9806 .
llvm-svn: 130422
2011-04-28 18:59:43 +00:00
Argyrios Kyrtzidis
e07425a5e7
When value-initializing the elements of an array not not included in the initializer make sure
...
that a non-trivial C++ constructor gets called.
Fixes rdar://9347552 & http://llvm.org/PR9801
llvm-svn: 130421
2011-04-28 18:53:58 +00:00
Argyrios Kyrtzidis
fddbcfbec4
Don't waste memory if the initializer expression is empty.
...
llvm-svn: 130420
2011-04-28 18:53:55 +00:00
Stuart Hastings
4b21495e42
Replace SmallVector with an array, as suggested by Frits van Bommel. rdar://problem/7662569
...
llvm-svn: 130417
2011-04-28 18:16:06 +00:00
Douglas Gregor
d517d55484
When determining whether two types are reference-compatible, check
...
non-CVR qualifiers as well as CVR qualifiers. For example, don't allow
a reference to an integer in address space 1 to bind to an integer in
address space 2.
llvm-svn: 130411
2011-04-28 17:56:11 +00:00
Manuel Klimek
7030b869a0
Fixes ArrayTypeTraitExpr (-Wnon-virtual-dtor).
...
llvm-svn: 130407
2011-04-28 17:03:03 +00:00
Douglas Gregor
b6100f2bdc
Only call the MacroExpands callback when we're actually going to
...
expand the macro, based on a patch by Ori Avtalion. Fixes PR9799.
llvm-svn: 130402
2011-04-28 16:36:13 +00:00
Douglas Gregor
068730992c
libstdc++ 4.4 uses __is_signed as an identifier, while Clang treats it
...
as a keyword for the __is_signed type trait. Cope with this conflict
via some hackish recovery: if we see a declaration of the form
static const bool __is_signed
then we stop treating __is_signed as a keyword and instead treat it as
an identifier. It's ugly, but it's better than making the __is_signed
type trait conditional on some language flag. Fixes PR9804.
llvm-svn: 130399
2011-04-28 15:48:45 +00:00
Lenny Maiorani
4af23c8159
Implements strcasecmp() checker in Static Analyzer.
...
llvm-svn: 130398
2011-04-28 15:09:11 +00:00
Chandler Carruth
6e1f9babcd
Silence more -Wnon-pod-memset given its current implementation. I may be
...
able to revert these based on a patch I'm working on, but no reason for
people to be spammed with warnings in the interim.
llvm-svn: 130394
2011-04-28 08:19:45 +00:00