]>
granicus.if.org Git - clang/log
John McCall [Tue, 9 Nov 2010 23:36:43 +0000 (23:36 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118649
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 9 Nov 2010 23:24:47 +0000 (23:24 +0000)]
Add a warning for implicit truncation of constant values due to
bitfield assignment.
Implements rdar://problem/
7809123
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118647
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 9 Nov 2010 22:45:16 +0000 (22:45 +0000)]
Add a compat note about how Clang doesn't zero-initialize __block local variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118641
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 9 Nov 2010 22:22:12 +0000 (22:22 +0000)]
Split out -Wconversion warnings about constant precision into their
own subcategory, -Wconstant-conversion, which is on by default.
Tweak the constant folder to give better results in the invalid
case of a negative shift amount.
Implements rdar://problem/
6792488
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118636
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 9 Nov 2010 21:40:30 +0000 (21:40 +0000)]
Test moved to its correct place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118635
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 9 Nov 2010 21:38:20 +0000 (21:38 +0000)]
Restore patch reversed in r118475. Fixes
// rdar://
8632525
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118634
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 21:07:58 +0000 (21:07 +0000)]
Attempt to resolve overloaded functions in comma expressions and
conditional operators. Fixes PR7863.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118631
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 9 Nov 2010 20:38:00 +0000 (20:38 +0000)]
Issues good diagnostic when @end is missing.
// rdar://
8283484
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118629
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 9 Nov 2010 20:15:55 +0000 (20:15 +0000)]
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118626
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 9 Nov 2010 20:14:26 +0000 (20:14 +0000)]
fix PR8380, a crash on invalid due to an illogical DeclSpec SourceRange being constructed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118625
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 20:03:54 +0000 (20:03 +0000)]
Revert the fix for PR8013.
That bug concerned the well-formedness of code such as (&ovl)(a, b,
c). GCC rejects the code, while EDG accepts it. On further study of the
standard, I see no support for EDG's position: in particular, C++
[over.over] does not list this as a context where we can take the
address of an overloaded function, C++ [over.call.func] does not
reference the address-of operator at any point, and C++ [expr.call]
claims that the function argument in a call is either a function
lvalue or a pointer-to-function; (&ovl) is neither.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118620
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 9 Nov 2010 20:00:56 +0000 (20:00 +0000)]
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 9 Nov 2010 19:43:35 +0000 (19:43 +0000)]
make the example a bit better, encouraging people to use "suggestions of what to use" in the message :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118612
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 9 Nov 2010 18:54:17 +0000 (18:54 +0000)]
Replace "#if __clang__" by "#if __has_feature(attribute_analyzer_noreturn)" to be consistent with all other snippets on this page.
Patch by Jean-Daniel Dupas!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118603
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Tue, 9 Nov 2010 18:04:24 +0000 (18:04 +0000)]
Use the right calling convention when mangling names in the Microsoft C++
mangler. Now member functions and pointers thereof have their calling
convention mangled as __thiscall if they have the default CC (even though,
they technically still have the __cdecl CC).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118598
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 9 Nov 2010 17:21:19 +0000 (17:21 +0000)]
Add support for soft/hard float options to the Sparc target
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118514
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 9 Nov 2010 16:41:02 +0000 (16:41 +0000)]
Include System/DataTypes.h in Diagnostic.h to get intptr_t.
Set Haiku's UserLabelPrefix to "".
Patch by Paul Davey.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118510
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 16:13:15 +0000 (16:13 +0000)]
Handle overload resolution when calling an overloaded function set
with, e.g., (&f)(a, b, c). Fixes PR8013.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118508
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 14:57:47 +0000 (14:57 +0000)]
Make #pragma unused work for static local variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118500
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Tue, 9 Nov 2010 11:21:43 +0000 (11:21 +0000)]
Remove the use of aliases in outputted code from ObjC (GNU runtime).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118498
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 9 Nov 2010 09:53:02 +0000 (09:53 +0000)]
Remove debugging printf.
Fix linux build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118497
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 9 Nov 2010 06:27:32 +0000 (06:27 +0000)]
lib/Lex/PPMacroExpansion.cpp: Fixup to appease MSVC.
Confirmed on MSVS10.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118496
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 06:24:54 +0000 (06:24 +0000)]
ntroduce clang_getSpellingLocation() into libclang, to provide the
location where we're spelling a token even within a
macro. clang_getInstantiationLocation() tells where we instantiated
the macro.
I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs,
since they gloss over macro-instantiation information.
Take 2: this time, adjusted tests appropriately and used a "simple"
approach to the spelling location.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118495
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 05:52:02 +0000 (05:52 +0000)]
Revert r118492, which didn't update all of its tests accordingly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118494
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 05:43:53 +0000 (05:43 +0000)]
Appeasing MSVC, take 3
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 05:28:47 +0000 (05:28 +0000)]
Introduce clang_getSpellingLocation() into libclang, to provide the
location where we're spelling a token even within a
macro. clang_getInstantiationLocation() tells where we instantiated
the macro.
I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs,
since they gloss over macro-instantiation information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118492
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 9 Nov 2010 05:25:47 +0000 (05:25 +0000)]
Introduce the concept of a non-virtual base type to CGRecordLayoutBuilder as a first step towards fixing PR6995.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118491
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 04:38:09 +0000 (04:38 +0000)]
Try to appease MSVC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118487
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 04:06:42 +0000 (04:06 +0000)]
Add missing include
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118485
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 03:59:40 +0000 (03:59 +0000)]
Teach code completion not to include out-of-line declarations and
definitions in its results. The original declarations will be visible
wherever they are declared.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118484
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 9 Nov 2010 03:43:49 +0000 (03:43 +0000)]
Fix the test for Release.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118483
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 03:43:04 +0000 (03:43 +0000)]
Add __nullptr as a C++0x nullptr literal, available in C++98
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118482
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 03:31:16 +0000 (03:31 +0000)]
Fix source locations in unnamed bitfield diagnostic, from Jakub
Wieczorek! Fixes PR8025.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118481
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 9 Nov 2010 03:25:21 +0000 (03:25 +0000)]
libclang and c-index-test can be built on Cygming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118480
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 9 Nov 2010 03:25:16 +0000 (03:25 +0000)]
c-index-test: Be available on Cygwin by using Win32's logic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118479
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 9 Nov 2010 03:20:07 +0000 (03:20 +0000)]
sprintf -> snprintf conversion, from Vladimir Kirillov
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 9 Nov 2010 02:24:38 +0000 (02:24 +0000)]
Remove this test for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 9 Nov 2010 02:24:08 +0000 (02:24 +0000)]
Reverse patch for // rdar://
8632525 . It might
has broken a build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 9 Nov 2010 02:16:57 +0000 (02:16 +0000)]
Remove space from rdar URIs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118474
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 9 Nov 2010 02:11:43 +0000 (02:11 +0000)]
Teach AttrNonNullChecker about transparent unions. Fixes crash reported in <rdar://problem/
8642434 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118473
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 9 Nov 2010 02:11:40 +0000 (02:11 +0000)]
Fix InitListExpr::getSourceRange() to work in the case of no locations for '(' and ')'. This can happen
in the case of transparent unions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 9 Nov 2010 01:30:48 +0000 (01:30 +0000)]
Fix miscompilation regarding VLAs; subscription of VLA pointers was incorrect.
Fixes rdar://
8644873 & http://llvm.org/PR8567.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118468
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 9 Nov 2010 01:18:05 +0000 (01:18 +0000)]
When re-using a vtable slot for the nearest overridden method, just because
there's no return adjustment from the overridden to the overrider doesn't
mean there isn't a return adjustment from the overrider to the final
overrider. This matters if we're emitting a virtual this-adjustment thunk
because the overrider virtually inherits from the class providing the
nearest overridden method. Do the appropriate return adjustment in this case.
Fixes PR7611.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118466
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 9 Nov 2010 00:19:31 +0000 (00:19 +0000)]
Fix warning about unused variable 'Fn' in no-asserts builds. Also reflow this
block so that it looks more like the rest of the file. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118459
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 8 Nov 2010 23:29:42 +0000 (23:29 +0000)]
Don't lose track of previous-declarations when instantiating a class template.
Fixes PR8001.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118454
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 8 Nov 2010 22:53:18 +0000 (22:53 +0000)]
Provide a precise builtin declaration for objc_msgSend
to avoid a bogus warning. Fixes //rdar: //
8632525
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118451
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Silverstein [Mon, 8 Nov 2010 21:43:51 +0000 (21:43 +0000)]
1) Fix a typo in PPCallbacks: It's elif, not elfif. :-) This is
contentful, since the typo was in the method-name...
2) Clarify some comments in RecursiveASTVisitor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118448
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 8 Nov 2010 21:14:15 +0000 (21:14 +0000)]
Add CursorVisitor::VisitBinaryOperator() to explicitly handle the case where we can blow out the stack due
to deeply nested BinaryOperators. This is done by turning the explicit recursion into being data recursive.
Fixes: <rdar://problem/8289205>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118444
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 8 Nov 2010 21:12:30 +0000 (21:12 +0000)]
If an instance method messages is sending to an expression of type Class,
and we statically can compute a bound on the actual type (e.g.,
because it's a send to the the magic "class" instance method), code
complete as if we were performing a class message send to that class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118443
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 8 Nov 2010 19:48:17 +0000 (19:48 +0000)]
Document Clang's support for attributes on individual enumerators and
tweak the documentation for deprecation-with-message. Provide __has_feature
tests for both. rdar://problem/
8605692
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Mon, 8 Nov 2010 19:39:10 +0000 (19:39 +0000)]
Add a forgotten break. Found by Rafael Espindola!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 8 Nov 2010 19:14:19 +0000 (19:14 +0000)]
When building a compound literal, check that the base element of the array is complete.
Fixes rdar://
8620582 & http://llvm.org/PR7905
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118428
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 8 Nov 2010 18:37:50 +0000 (18:37 +0000)]
Fixes a rewrite bug, rewriting nested property usage
inside blocks. Fixes //rdar: //
8608293 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118425
91177308 -0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Mon, 8 Nov 2010 17:46:39 +0000 (17:46 +0000)]
Use integrated-as for processing .s files on FreeBSD. Copied
from Linux/OpenBSD code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118419
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 8 Nov 2010 17:16:59 +0000 (17:16 +0000)]
Improve our handling of C++ [class.copy]p3, which specifies that a
constructor template will not be used to copy a class object to a
value of its own type. We were eliminating all constructor templates
whose specializations look like a copy constructor, which eliminated
important candidates. Fixes PR8182.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118418
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 8 Nov 2010 16:52:54 +0000 (16:52 +0000)]
Only enable the ObjCAtSyncChecker when the translation unit uses Objective-C.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118414
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 8 Nov 2010 15:20:28 +0000 (15:20 +0000)]
When attempting reference binding to an overloaded function, also
consider that we might be trying to bind a reference to a class type,
which involves a constructor call. Fixes PR7425.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118407
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 8 Nov 2010 14:48:47 +0000 (14:48 +0000)]
Pass "-z relro" as two arguments. This works with both gnu ld and gold.
Patch by Frits van Bommel.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118406
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 8 Nov 2010 04:28:51 +0000 (04:28 +0000)]
Clean up some of the comments in Index.h (e.g., misnamed or extra parameters in comments).
Patch by Chris Pick!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118403
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 8 Nov 2010 03:58:01 +0000 (03:58 +0000)]
Add missing test case for PR8230
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118402
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 8 Nov 2010 03:40:48 +0000 (03:40 +0000)]
Properly diagnose invalid casts to function references. Patch by
Faisal Vali, tweaked by me. Fixes PR8230.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118400
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 8 Nov 2010 01:05:10 +0000 (01:05 +0000)]
test/CodeGenCXX/rtti-linkage.cpp: Get rid of sort(1) to remove XFAIL: win32.
On the certain system, bogus SORT.EXE is picked up. Its sort-order is incompatible to POSIX.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118391
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 7 Nov 2010 23:13:01 +0000 (23:13 +0000)]
Use the integrated assembler when procession .s files on OpenBSD and Linux.
Original patch for OpenBSD by Vladimir Kirillov.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118386
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 7 Nov 2010 23:05:16 +0000 (23:05 +0000)]
Remove broken support for variadic templates, along with the various
abstractions (e.g., TemplateArgumentListBuilder) that were designed to
support variadic templates. Only a few remnants of variadic templates
remain, in the parser (parsing template type parameter packs), AST
(template type parameter pack bits and TemplateArgument::Pack), and
Sema; these are expected to be used in a future implementation of
variadic templates.
But don't get too excited about that happening now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118385
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 7 Nov 2010 22:57:16 +0000 (22:57 +0000)]
Add support for -rdynamic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118384
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 7 Nov 2010 20:14:31 +0000 (20:14 +0000)]
Use ld directly on linux. Changes from the previous try:
*) Try to detect as much as possible from the system itself, not the distro.
This should make it easier to port to a new distro and more likely to
work on a unknown one.
*) The distro enum now doesn't include the arch. Just use the existing
host detection support in LLVM.
*) Correctly handle --sysroot.
A small regression is that now clang will pass bitcode file to the linker.
This is necessary for the gold plugin support to work.
It might be better to detect this at configure/cmake time, but doing it in
c++ first is a lot easier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118382
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 7 Nov 2010 19:13:55 +0000 (19:13 +0000)]
A union cannot contain static data members or data members of reference type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118381
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 7 Nov 2010 06:11:36 +0000 (06:11 +0000)]
Change the StringSet used by CalculateHiddenNames() to use a BumpPtrAllocator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118372
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 7 Nov 2010 06:11:33 +0000 (06:11 +0000)]
Fix memory leak of IdentifierIterator object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118371
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sun, 7 Nov 2010 02:35:25 +0000 (02:35 +0000)]
ARM EH uses a different personality function in C.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118366
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 6 Nov 2010 18:09:55 +0000 (18:09 +0000)]
Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118345
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 6 Nov 2010 14:58:53 +0000 (14:58 +0000)]
Don't warn when matching %p to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118344
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 6 Nov 2010 09:44:32 +0000 (09:44 +0000)]
Simplify the logic for emitting guard variables for template static
data members by delaying the emission of the initializer until after
linkage and visibility have been set on the global. Also, don't
emit a guard unless the variable actually ends up with vague linkage,
and don't use thread-safe statics in any case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118336
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Silverstein [Sat, 6 Nov 2010 06:25:02 +0000 (06:25 +0000)]
Fix a bug where we were recursing on friend decls for friend
functions, but not for friend types.
Reviewed by wan
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118323
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Silverstein [Sat, 6 Nov 2010 01:19:03 +0000 (01:19 +0000)]
Add PPCallbacks for #if/#ifdef/etc.
The callback info for #if/#elif is not great -- ideally it would give
us a list of tokens in the #if, or even better, a little parse tree.
But that's a lot more work. Instead, clients can retokenize using
Lexer::LexFromRawLexer().
Reviewed by nlewycky.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118318
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 5 Nov 2010 23:25:18 +0000 (23:25 +0000)]
When determining which template partial specialization is more specialized,
make sure to setup the instantiation stack. Fixes rdar://
8620775 & http://llvm.org/PR8234
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118314
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 5 Nov 2010 23:22:45 +0000 (23:22 +0000)]
When searching for an instantiated declaration requires instantiation
of its parent context, be sure to update the parent-context pointer
after instantiation. Fixes two anonymous-union instantiation issues in
<rdar://problem/
8635664 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118313
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 5 Nov 2010 22:21:31 +0000 (22:21 +0000)]
Check for an invalid field earlier in a constructor's initialization
of that field. Otherwise, we can end up building and later trying to
instantiate a dependent member initializer that will fail at
instantiation time.
Unfortunately, I've only managed to trigger this bug with very large
sources, so there's no test case :(
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118306
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 5 Nov 2010 22:20:49 +0000 (22:20 +0000)]
Don't write an empty DIAG_USER_MAPPINGS record.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118305
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 5 Nov 2010 22:10:18 +0000 (22:10 +0000)]
Read/write from/to PCH the diagnostic mappings that the user set so that e.g. #pragma clang diagnostic can be used in a PCH.
Fixes rdar://
8435969 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 5 Nov 2010 22:10:14 +0000 (22:10 +0000)]
Initialize the array with the "C++ way".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118302
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 5 Nov 2010 21:11:19 +0000 (21:11 +0000)]
Teach clang_getCursorReferenced() that a
CXXConstructorExpr/CXXTemporaryObjectExpr references the constructor
it calls. Then, tweak clang_getCursor() to prefer such a call over a
type reference to the type being called.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118297
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 5 Nov 2010 19:56:37 +0000 (19:56 +0000)]
Put class into an anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118293
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 5 Nov 2010 18:34:46 +0000 (18:34 +0000)]
Proper rewriting of block envokation with
qualified ObjC pointer types in its argument list.
// rdar: //
8608902
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118286
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 5 Nov 2010 17:21:46 +0000 (17:21 +0000)]
libclang: Enable requesting a larger stack for several libclang entry points
using "safety" threads.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118278
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 5 Nov 2010 15:21:33 +0000 (15:21 +0000)]
Expressions of type std::nullptr_t can be used as sentinels.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118276
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 5 Nov 2010 07:19:31 +0000 (07:19 +0000)]
libclang: Add some support for running certain entry points in a "safety"
thread, primarily to get a larger stack.
- Yes, I feel dirty.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118274
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 5 Nov 2010 07:19:21 +0000 (07:19 +0000)]
Fix 80-col violas.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118273
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 5 Nov 2010 00:12:09 +0000 (00:12 +0000)]
Implement [over.ics.rank]p4: A conversion that does not convert an std::nullptr_t to bool is better than one than does.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118269
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 4 Nov 2010 19:11:31 +0000 (19:11 +0000)]
Adjust return type of thread_runner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118259
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 4 Nov 2010 19:04:38 +0000 (19:04 +0000)]
Use the real keyword location when rebuilding an elaborated type instead of
making something up. Fixes PR8129.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 4 Nov 2010 12:18:32 +0000 (12:18 +0000)]
Pass a -I flag when compiling nullptr.cpp so the typeinfo header can be found. This should fix the errors seen on the bot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 4 Nov 2010 08:48:52 +0000 (08:48 +0000)]
Don't be so eager to replace UsingDecls in a DeclContext's lookup table;
check that the TargetNestedNameDecl is the same first.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118239
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 4 Nov 2010 05:28:09 +0000 (05:28 +0000)]
std::nullptr_t is a fundamental type for RTTI purposes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 4 Nov 2010 04:31:32 +0000 (04:31 +0000)]
Mangle std::nullptr_t as specified by the Itanium C++ ABI.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 4 Nov 2010 03:18:57 +0000 (03:18 +0000)]
Don't instantiate members not belonging in the semantic context of the template.
e.g. for:
template <int i> class A {
class B *g;
};
'class B' has the template as lexical context but semantically it is
introduced in namespace scope.
Fixes rdar://
8611125 & http://llvm.org/PR8505
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 4 Nov 2010 03:17:43 +0000 (03:17 +0000)]
It's OK to use nullptr in relational operators if the other side is a null pointer constant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 4 Nov 2010 01:26:31 +0000 (01:26 +0000)]
c-index-test: Switch to using clang_executeOnThread instead of mucking about
with system specific stuff.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118224
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 4 Nov 2010 01:26:29 +0000 (01:26 +0000)]
libclang: Add clang_executeOnThread, for use in c-index-test (and only there,
preferably). Good thing c-index-test is written in C!!!!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118223
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 4 Nov 2010 00:14:23 +0000 (00:14 +0000)]
add a comment to my last commit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118212
91177308 -0d34-0410-b5e6-
96231b3b80d8