Douglas Gregor
6f2e095f06
When referring to a tag that was previously declared only as a friend,
...
build a new declaration for that tag type that will be visible for
future lookups of that tag.
llvm-svn: 105643
2010-06-08 21:27:36 +00:00
Douglas Gregor
ce21919bd6
A built-in overload candidate is consider a non-template function when
...
determining whether one overload candidate is better than
another. Fixes PR7319.
llvm-svn: 105642
2010-06-08 21:03:17 +00:00
Daniel Dunbar
ee6b692551
Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.
...
llvm-svn: 105638
2010-06-08 20:44:43 +00:00
Daniel Dunbar
e6c1daa8fd
Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
...
- This eliminates most dependencies on how Clang is installed relative to LLVM.
llvm-svn: 105637
2010-06-08 20:34:18 +00:00
Douglas Gregor
ec170db73d
Warn about comparisons between arrays and improve self-comparison
...
warnings, from Troy Straszheim! Fixes PR6163.
llvm-svn: 105631
2010-06-08 19:50:34 +00:00
Fariborz Jahanian
8e73928f52
Fixes a typo which prevented proper code gen. for
...
copy-in of c++ class objects into blocks.
llvm-svn: 105622
2010-06-08 17:52:11 +00:00
Douglas Gregor
4038cf4b57
Implement a warning when converting the literal 'false' to a
...
pointer. Original patch by Troy D. Straszheim; fixes PR7283.
llvm-svn: 105621
2010-06-08 17:35:15 +00:00
Nate Begeman
4904e32d46
Since the enum values for each arch's builtins overlap, it is not appropriate to check them when compiling or other archs. Fixes a problem where compiling for NEON would use x86 sema rules.
...
llvm-svn: 105593
2010-06-08 02:47:44 +00:00
Nate Begeman
a011002195
Extend __builtin_shufflevector to expose the full power of the llvm shufflevector instruction. This means it can now be used for vector truncation and concatenation. This will be used for the ARM NEON implementation.
...
llvm-svn: 105589
2010-06-08 00:16:34 +00:00
Fariborz Jahanian
be21aa34a0
When using property-dot assignment syntax to call a setter method,
...
type of rhs need be compared to setter's argument and
not the getter type. Fixes radar 8062778
llvm-svn: 105560
2010-06-07 22:02:01 +00:00
Fariborz Jahanian
28ed927ddf
Use MaybeCreateCXXExprWithTemporaries for potential destruction of
...
created temporary. Use own initialized entity for copied in block
variables.
llvm-svn: 105533
2010-06-07 16:14:00 +00:00
Jeffrey Yasskin
caa710dfd2
PR7245: Make binding a reference to a temporary without a usable copy
...
constructor into an extension warning into the error that C++98 requires.
llvm-svn: 105529
2010-06-07 15:58:05 +00:00
John McCall
cb0f89a434
Simplify the methods for creating a pointer, reference, member-pointer,
...
or block-pointer type by removing the qualifiers parameter. Introduce a
method to perform semantic checking when adding qualifiers to a type.
llvm-svn: 105526
2010-06-05 06:41:15 +00:00
Abramo Bagnara
d73405829b
Added AccessSpecDecl node.
...
llvm-svn: 105525
2010-06-05 05:09:32 +00:00
Jeffrey Yasskin
2f96e9f5c9
Add an extension to avoid an error when a global template has the same name as
...
a member template, and you try to call the member template with an explicit
template argument. See PR7247
For example, this downgrades the error to a warning in:
template<typename T> struct set{};
struct Value {
template<typename T>
void set(T value) {
}
};
void foo() {
Value v;
v.set<double>(3.2); // Warning here.
}
llvm-svn: 105518
2010-06-05 01:39:57 +00:00
John McCall
8cb7bdfd33
Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.
...
This is never null, but the associated type might be.
llvm-svn: 105503
2010-06-04 23:28:52 +00:00
Anders Carlsson
76f513f862
When deciding whether reinterpret_cast casts away constness we need to look at array qualifiers. Fixes rdar://problem/8018292.
...
llvm-svn: 105494
2010-06-04 22:47:55 +00:00
Fariborz Jahanian
ea882cd92e
Build AST for copy-construction of copied-in
...
class object in blocks and carry it to IRGen.
llvm-svn: 105487
2010-06-04 21:35:44 +00:00
John McCall
339bb66246
Remember type source information for Objective C property declarations.
...
llvm-svn: 105484
2010-06-04 20:50:08 +00:00
John McCall
8e346702b6
Preserve more information from a block's original function declarator, if one
...
was given. Remove some unnecessary accounting from BlockScopeInfo. Handle
typedef'ed function types until such time as we decide not.
llvm-svn: 105478
2010-06-04 19:02:56 +00:00
John McCall
a3ccba0417
Restructure how we interpret block-literal declarators. Correctly handle
...
the case where we pick up block arguments from a typedef. Save the block
signature as it was written, and preserve same through PCH.
llvm-svn: 105466
2010-06-04 11:21:44 +00:00
Abramo Bagnara
52d6350dd2
Don't insert in lexical context implicit definitions of static member instances.
...
llvm-svn: 105465
2010-06-04 09:35:39 +00:00
Douglas Gregor
2e87ca218f
When checking for equality of template parameter lists, a template
...
type parameter pack is distinct from a template type parameter.
llvm-svn: 105464
2010-06-04 08:34:32 +00:00
John McCall
b1cd7dac3d
Delay checking for mutable const fields until we're checking the field.
...
Allows this check to work properly for instantiated fields and removes
an unnecessary GetTypeForDeclarator call.
llvm-svn: 105463
2010-06-04 08:34:12 +00:00
John McCall
ec6f4e9017
More refactoring.
...
llvm-svn: 105458
2010-06-04 02:29:22 +00:00
John McCall
4a2429aa5a
Remove a couple of unnecessary uses of IsStandardConversion.
...
llvm-svn: 105445
2010-06-04 00:29:51 +00:00
Eli Friedman
91a3d27ec0
Make sure to check the accessibility of and mark the destructor for the
...
operand of a throw expression. Fixes PR7281.
llvm-svn: 105408
2010-06-03 20:39:03 +00:00
Anders Carlsson
a2f74f3c98
Add all final overriders to the map.
...
llvm-svn: 105374
2010-06-03 01:00:02 +00:00
Daniel Dunbar
f7ced25a2a
Fix unintentional method call due to false -> pointer conversion; patch by Dimitry Andric!
...
llvm-svn: 105327
2010-06-02 15:46:52 +00:00
Douglas Gregor
876cec2898
typeid() produces type information for the cv-unqualified version of
...
the type. Thanks to Anders for the bug report!
llvm-svn: 105314
2010-06-02 06:16:02 +00:00
John McCall
75b960e5ee
Alter the ExternalASTSource interface to permit by-name lookups. PCH continues to
...
bring in the entire lookup table at once.
Also, give ExternalSemaSource's vtable a home. This is important because otherwise
any reference to it will cause RTTI to be emitted, and since clang is compiled
with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's
RTTI). So this change makes it possible to subclass ExternalSemaSource from projects
compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti.
llvm-svn: 105268
2010-06-01 09:23:16 +00:00
Ted Kremenek
305a0a7416
Fix crash in code completion when an ObjCMethodDecl doesn't have an associated @interface.
...
Fixes <rdar://problem/8026215>.
llvm-svn: 105256
2010-05-31 21:43:10 +00:00
Alexis Hunt
ed05325dbe
Convert DeclNodes to use TableGen.
...
The macros required for DeclNodes use have changed to match the use of
StmtNodes. The FooFirst enumerator constants have been named firstFoo
to match usage elsewhere.
llvm-svn: 105165
2010-05-30 07:21:58 +00:00
Douglas Gregor
6ed3eb8a48
Teach code-completion for calls to be more careful with a
...
potentially-NULL "function" argument.
llvm-svn: 105152
2010-05-30 06:10:08 +00:00
Douglas Gregor
7aa6b229fe
Teach code completion to adjust its completion priorities based on the
...
type that we expect to see at a given point in the grammar, e.g., when
initializing a variable, returning a result, or calling a function. We
don't prune the candidate set at all, just adjust priorities to favor
things that should type-check, using an ultra-simplified type system.
llvm-svn: 105128
2010-05-30 01:49:25 +00:00
John McCall
f7bcc81213
Copy source information for the inner type of an elaborated type; fixes some
...
valgrind problems.
llvm-svn: 105062
2010-05-28 23:32:21 +00:00
Daniel Dunbar
a688566f0a
Sema: Fix comment, apparently #pragma options align=power is just the same as
...
align=native, at least for the platforms we support.
llvm-svn: 105000
2010-05-28 20:08:00 +00:00
Daniel Dunbar
5794c6fa43
Sema: Just ignore '#pragma options align=power' for now, this is no worse than
...
what we used to be doing, and makes sure that paired '#pragma options
align=reset' won't fail.
llvm-svn: 104998
2010-05-28 19:43:33 +00:00
John McCall
f24d7bbbcd
A more minimal fix for PR6762.
...
llvm-svn: 104991
2010-05-28 18:45:08 +00:00
John McCall
61d8258fa3
Roll back r104941.
...
llvm-svn: 104990
2010-05-28 18:25:28 +00:00
John McCall
f9c94093f9
Disable exception-spec compatibility checking under -fno-exceptions.
...
Fixes PR7243.
llvm-svn: 104942
2010-05-28 08:37:35 +00:00
John McCall
2177a9b65a
Add a new attribute on records, __attribute__((adl_invisible)), and define
...
the x86-64 __va_list_tag with this attribute. The attribute causes the
affected type to behave like a fundamental type when considered by ADL.
(x86-64 is the only target we currently provide with a struct-based
__builtin_va_list)
Fixes PR6762.
llvm-svn: 104941
2010-05-28 08:20:36 +00:00
John McCall
0af3d3b0f4
Optimize and complete associated-class-and-namespace collection from
...
a type.
llvm-svn: 104938
2010-05-28 06:08:54 +00:00
Douglas Gregor
ed2540d205
When we complain about a member being inaccessible due to a constraint
...
along an access path, add another note pointing at the member we
actually found.
llvm-svn: 104937
2010-05-28 04:34:55 +00:00
John McCall
4583186b8b
When filtering out previous declarations of friend functions, consider the
...
lookup context, not the direct semantic context. Fixes PR7230.
llvm-svn: 104917
2010-05-28 01:41:47 +00:00
Douglas Gregor
d37c59dae7
Don't put method bodies into code completions unless code patterns are
...
turned on.
llvm-svn: 104909
2010-05-28 00:57:46 +00:00
Douglas Gregor
70febae768
Do not produce types as valid code completions when we're in an
...
expression context in C/Objective-C, or when we're in an
@interface/@implementation/@protocol in Objective-C(++).
llvm-svn: 104908
2010-05-28 00:49:12 +00:00
Douglas Gregor
f4c33349b5
Make -code-completion-patterns only cover multi-line code
...
completions. Plus, tweak a few completion patterns to better reflect
the language grammar.
llvm-svn: 104905
2010-05-28 00:22:41 +00:00
Douglas Gregor
a817a19bc6
Implement a code-completion hook for the receiver of an Objective-C
...
message. This completion gives better results than just using the
"expression" completion, which is effectively what happened before.
llvm-svn: 104895
2010-05-27 23:06:34 +00:00
Douglas Gregor
fd42e9542c
Tweak the fix-it for a copy constructor declared to take its argument
...
by-value. We now only prepend a space if it is needed.
llvm-svn: 104889
2010-05-27 21:28:21 +00:00