Ted Kremenek
468365b6be
[analyzer] check lazy bindings in RegionStore first before looking for default values. Fixes <rdar://problem/11269741>.
...
llvm-svn: 155615
2012-04-26 05:08:26 +00:00
Ted Kremenek
01d152f43f
Teach RetainCountChecker that it doesn't quite understand pthread_setspecific and it should just give up when it sees it. Fixes <rdar://problem/11282706>.
...
llvm-svn: 155613
2012-04-26 04:32:23 +00:00
Richard Smith
359087cade
PR12660: Don't crash when initializing a const reference from a braced init list
...
which creates a temporary by calling a constructor.
llvm-svn: 155608
2012-04-26 03:16:45 +00:00
Chandler Carruth
3634c66b41
Fix a long-standing bug where Clang had a different default from GCC on
...
Linux and other (non-Darwin) platforms and have it use -fmath-errno by
default (for better or worse).
Darwin has seen the light here and uses -fno-math-errno by default, this
patch preserves that.
If any maintainers for a non-Linux platform would also like to opt-in to
-fno-math-errno by default, I'm happy to add folks, but we're currently
getting buts and misleading comparisons with GCC due to this difference
in behavior on Linux at least.
llvm-svn: 155607
2012-04-26 02:10:51 +00:00
Richard Smith
bc8c5b5d67
Two missing -Wc++98-compat warnings, for null pointers as non-type template
...
arguments, and 'this' in exception-specifications.
llvm-svn: 155606
2012-04-26 01:51:03 +00:00
Rafael Espindola
4c3db23d1c
Reject cases like
...
struct __attribute__((visibility("hidden"))) a;
struct __attribute__((visibility("default"))) b;
which gcc already rejects.
llvm-svn: 155603
2012-04-26 01:26:03 +00:00
Richard Smith
6ca73133ca
If a type is non-literal by virtue of being incomplete produce notes
...
explaining that.
llvm-svn: 155598
2012-04-25 23:23:48 +00:00
Fariborz Jahanian
94ee181e08
objective-c modern translator: more tests.
...
llvm-svn: 155585
2012-04-25 20:48:00 +00:00
Kaelyn Uhrain
76e07347ba
Add an error message with fixit hint for changing '.' to '->'.
...
This is mainly for attempting to recover in cases where a class provides
a custom operator-> and a '.' was accidentally used instead of '->' when
accessing a member of the object returned by the current object's
operator->.
llvm-svn: 155580
2012-04-25 19:49:54 +00:00
Argyrios Kyrtzidis
6fe744cc38
When resolving default template arguments, it should be done in the declaration context
...
of the template what we are going to instantiate.
Fixes various crashes of rdar://11242625 & http://llvm.org/PR11421 .
llvm-svn: 155576
2012-04-25 18:39:17 +00:00
Richard Smith
1ad04d95bc
PR12625: Cope with classes which have incomplete base or member types:
...
Don't try to query whether an incomplete type has a trivial copy constructor
when determining whether a move constructor should be declared.
llvm-svn: 155575
2012-04-25 18:28:49 +00:00
Fariborz Jahanian
78731c7098
improve a modern objc translator test.
...
llvm-svn: 155569
2012-04-25 18:11:57 +00:00
Fariborz Jahanian
e49a42cae9
modern objc rewriter: fixes a bug writing
...
a const qualified static c-function.
// rdar://11314329
llvm-svn: 155564
2012-04-25 17:56:48 +00:00
Evgeniy Stepanov
0a0655affa
Make asan-ld test windows-safe.
...
llvm-svn: 155543
2012-04-25 09:28:10 +00:00
Manuel Klimek
3778a435d1
Fixes the header search logic for tools:
...
The driver needs to get the correct path to the executable to deduce
the header search path.
llvm-svn: 155542
2012-04-25 09:25:41 +00:00
Evgeniy Stepanov
7786671b5a
Clang driver support for linking on Android.
...
llvm-svn: 155541
2012-04-25 08:59:22 +00:00
Evgeniy Stepanov
78eaa2cd1b
Fix default cpu for -march=armv5e.
...
llvm-svn: 155540
2012-04-25 08:35:56 +00:00
Chad Rosier
155005c071
Add atan, atan2, exp, and log to the builtin math library functions.
...
With -fno-math-errno (the default for Darwin) or -ffast-math these library
function can be marked readnone enabling more opportunities for CSE and other
optimizations.
rdar://11251464
llvm-svn: 155498
2012-04-24 22:40:01 +00:00
Nico Weber
1d725ecf93
Let NULL and MSVC headers coexist better.
...
Fixes the two issues mentioned in PR12146.
llvm-svn: 155490
2012-04-24 21:27:01 +00:00
Fariborz Jahanian
847713a998
modern objc translator: Allow writing of multiple
...
declaration of __block variables on same lines
with initializers. // rdsr://7547630
llvm-svn: 155473
2012-04-24 19:38:45 +00:00
Fariborz Jahanian
32af25ea05
objc modern rewriter: allow translation of
...
multiple declaration of block variables
(with no initializer) on the same line.
llvm-svn: 155462
2012-04-24 18:16:20 +00:00
Evgeniy Stepanov
582911a089
Only pass -mcpu, -march, -mfpu to linux-as on ARM.
...
llvm-svn: 155431
2012-04-24 09:05:31 +00:00
Kostya Serebryany
5dd2cfc81e
enable TBAA when -fthread-sanitizer is given, even with -O0 or -relaxed-aliasing
...
llvm-svn: 155430
2012-04-24 06:57:01 +00:00
Richard Smith
2cc2b46683
Don't try to delay parsing the exception specification for a data member of a
...
class; we would never actually parse it and attach it to the type.
llvm-svn: 155426
2012-04-24 05:48:42 +00:00
Chandler Carruth
3dfb6d84c6
Introduce an initial sketch of a MSVC compatible 'intrin.h' builtin
...
header, along with a stub test to make sure it compiles in the
appropriate modes.
Thanks to Aaron Ballman for working with me to figure out the initial
strategy here, and to Nico for reviewing and pestering me to actually
commit it.
llvm-svn: 155425
2012-04-24 05:23:54 +00:00
Richard Smith
4e42bc8365
PR12629: Cope with parenthesized function types when attaching a delayed
...
exception specification to a function.
llvm-svn: 155424
2012-04-24 05:06:35 +00:00
NAKAMURA Takumi
8701d38c93
clang/test/Rewriter/objc-modern-boxing.mm: Mark as XFAIL:mingw for now, due to predefined __declspec similar to r155278.
...
llvm-svn: 155417
2012-04-24 01:19:04 +00:00
DeLesley Hutchins
8e9fc0592b
Thread safety analysis: refactor test cases so that the style is
...
consistent.
llvm-svn: 155388
2012-04-23 20:41:57 +00:00
Fariborz Jahanian
08a1eb77c5
with -Wdeprecated, include a note to its deprecated declaration
...
location. // rdar://10893232
llvm-svn: 155385
2012-04-23 20:30:52 +00:00
Eric Christopher
3cc207bbcc
Forward declarations should take a context. This helps the debugger
...
find forward declarations in the context that the actual definition
will occur.
rdar://11291658
llvm-svn: 155381
2012-04-23 19:00:24 +00:00
DeLesley Hutchins
e09be231fa
Thread safety analysis: support the use of pt_guarded_by attributes
...
on smart pointers. Also adds test case for previous commit.
llvm-svn: 155379
2012-04-23 18:39:55 +00:00
Rafael Espindola
b522a5f246
Fix visibility when we have two types with explicit visibility in a template
...
argument list.
llvm-svn: 155368
2012-04-23 17:51:55 +00:00
DeLesley Hutchins
70b5e8eefc
Thread-safety analysis: support new "pointer to member" syntax for
...
existentially quantified lock expressions.
llvm-svn: 155357
2012-04-23 16:45:01 +00:00
Douglas Gregor
39f39ff4b7
Teach RequireCompleteType about multi-dimensional arrays. Fixes
...
<rdar://problem/11284902>.
llvm-svn: 155356
2012-04-23 16:42:52 +00:00
Bob Wilson
16c4a4f471
Add a test for svn r155263.
...
llvm-svn: 155353
2012-04-23 16:22:22 +00:00
Rafael Espindola
23fd21d4ee
Add another testcase that was not being covered.
...
llvm-svn: 155351
2012-04-23 14:02:53 +00:00
Anton Korobeynikov
df32b6f2de
Do not use stdint.h, driver might provide invalid location for it. Instead, provide the types directly.
...
This should fix PR12628
llvm-svn: 155342
2012-04-23 09:02:13 +00:00
Rafael Espindola
cba4879534
Add a testcase that we already get right but was not being tested. Found
...
by a chrome build on OS X. Thanks to Nico Weber for testing a patch and
providing the .ii file.
llvm-svn: 155326
2012-04-22 22:31:25 +00:00
Rafael Espindola
1e762442c7
Cleanup testcase.
...
llvm-svn: 155317
2012-04-22 16:03:00 +00:00
Rafael Espindola
bbc5cbc410
An attribute in a explicit template installation should take precedence over
...
the tempale arguments in deciding the visibility.
This agrees with gcc 4.7.
Found by trying to build chrome with component=shared_library with 155314
reverted.
llvm-svn: 155316
2012-04-22 15:31:59 +00:00
Rafael Espindola
6b6e879221
Revert 155102 but add a fixme while I debug what is wrong with chrome's
...
components build.
llvm-svn: 155314
2012-04-22 12:37:27 +00:00
Richard Smith
f3c37e89a1
PR12571: Objects of type clang::ConstantArrayType aren't always emitted with
...
type llvm::ArrayType -- sometimes we emit them as packed structs. Don't assert
if such a global array has an element type with a non-trivial destructor.
llvm-svn: 155305
2012-04-22 05:51:36 +00:00
Rafael Espindola
fae3f908d8
Add another missing testcase.
...
llvm-svn: 155304
2012-04-22 02:41:22 +00:00
Richard Smith
e85e176600
PR12585: When processing a friend template inside a class template, don't
...
pretend there was no previous declaration -- that can lead us to injecting
a class template (with no access specifier) into a class scope. Instead,
just avoid the problematic checks.
llvm-svn: 155303
2012-04-22 02:13:50 +00:00
Rafael Espindola
4304101fb2
Add a testcase we were already getting right, but were not testing for.
...
llvm-svn: 155302
2012-04-22 01:22:25 +00:00
Rafael Espindola
8add48ec9e
Fix handling of template parameters. Found by inspection. GCC 4.7 agrees
...
with this testcase.
llvm-svn: 155301
2012-04-22 00:43:48 +00:00
Richard Smith
84973e56e3
Fix regression in r154844. If necessary, defer computing adjusted destructor
...
exception specifications in C++11 until after we've parsed the exception
specifications for nested classes.
llvm-svn: 155293
2012-04-21 18:42:51 +00:00
Richard Smith
8b987a9976
Fix serialization of uninstantiated exception specifications. Patch by Li Kan,
...
test by me.
llvm-svn: 155289
2012-04-21 17:47:47 +00:00
NAKAMURA Takumi
c6fbdf027f
clang/test/Rewriter/rewrite-modern-extern-c-func-decl.mm: Mark as XFAIL:mingw for now, due to predefined __declspec.
...
It could be tweaked to add -triple i686-win32, though.
llvm-svn: 155278
2012-04-21 09:39:58 +00:00
Richard Smith
9f2a7b2e08
Fix test failure.
...
llvm-svn: 155271
2012-04-21 01:51:32 +00:00